pub enum SubscriptionId {
Number(u64),
String(String),
}
Expand description
Unique subscription id. NOTE Assigning same id to different requests will cause the previous request to be unsubscribed.
Variants§
Implementations§
Source§impl 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§
Source§impl Clone for SubscriptionId
impl Clone for SubscriptionId
Source§fn clone(&self) -> SubscriptionId
fn clone(&self) -> SubscriptionId
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SubscriptionId
impl Debug for SubscriptionId
Source§impl From<String> for SubscriptionId
impl From<String> for SubscriptionId
Source§fn from(other: String) -> SubscriptionId
fn from(other: String) -> SubscriptionId
Converts to this type from the input type.
Source§impl From<u64> for SubscriptionId
impl From<u64> for SubscriptionId
Source§fn from(other: u64) -> SubscriptionId
fn from(other: u64) -> SubscriptionId
Converts to this type from the input type.
Source§impl Hash for SubscriptionId
impl Hash for SubscriptionId
Source§impl PartialEq for SubscriptionId
impl PartialEq for SubscriptionId
impl Eq for SubscriptionId
impl StructuralPartialEq for SubscriptionId
Auto Trait Implementations§
impl Freeze for SubscriptionId
impl RefUnwindSafe for SubscriptionId
impl Send for SubscriptionId
impl Sync for SubscriptionId
impl Unpin for SubscriptionId
impl UnwindSafe for SubscriptionId
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)