Enum jsonrpc_pubsub::SubscriptionId
source · [−]Expand description
Unique subscription id.
NOTE Assigning same id to different requests will cause the previous request to be unsubscribed.
Variants
Number(u64)
A numerical ID, represented by a u64
.
String(String)
A non-numerical ID, for example a hash.
Implementations
sourceimpl SubscriptionId
impl SubscriptionId
sourcepub fn parse_value(val: &Value) -> Option<SubscriptionId>
pub fn parse_value(val: &Value) -> Option<SubscriptionId>
Parses core::Value
into unique subscription id.
Trait Implementations
sourceimpl Clone for SubscriptionId
impl Clone for SubscriptionId
sourcefn clone(&self) -> SubscriptionId
fn clone(&self) -> SubscriptionId
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SubscriptionId
impl Debug for SubscriptionId
sourceimpl From<String> for SubscriptionId
impl From<String> for SubscriptionId
sourceimpl From<SubscriptionId> for Value
impl From<SubscriptionId> for Value
sourcefn from(sub: SubscriptionId) -> Self
fn from(sub: SubscriptionId) -> Self
Performs the conversion.
sourceimpl Hash for SubscriptionId
impl Hash for SubscriptionId
sourceimpl PartialEq<SubscriptionId> for SubscriptionId
impl PartialEq<SubscriptionId> for SubscriptionId
sourcefn eq(&self, other: &SubscriptionId) -> bool
fn eq(&self, other: &SubscriptionId) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &SubscriptionId) -> bool
fn ne(&self, other: &SubscriptionId) -> bool
This method tests for !=
.
impl Eq for SubscriptionId
impl StructuralEq for SubscriptionId
impl StructuralPartialEq for SubscriptionId
Auto Trait Implementations
impl RefUnwindSafe for SubscriptionId
impl Send for SubscriptionId
impl Sync for SubscriptionId
impl Unpin for SubscriptionId
impl UnwindSafe for SubscriptionId
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more