pub enum SubscriptionId<'a> {
Num(u64),
Str(Cow<'a, str>),
}
Expand description
Id of a subscription, communicated by the server.
Variants§
Implementations§
source§impl<'a> SubscriptionId<'a>
impl<'a> SubscriptionId<'a>
sourcepub fn into_owned(self) -> SubscriptionId<'static>
pub fn into_owned(self) -> SubscriptionId<'static>
Convert SubscriptionId<'a>
to SubscriptionId<'static>
so that it can be moved across threads.
This can cause an allocation if the id is a string.
Trait Implementations§
source§impl<'a> Clone for SubscriptionId<'a>
impl<'a> Clone for SubscriptionId<'a>
source§fn clone(&self) -> SubscriptionId<'a>
fn clone(&self) -> SubscriptionId<'a>
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<'a> Debug for SubscriptionId<'a>
impl<'a> Debug for SubscriptionId<'a>
source§impl<'de: 'a, 'a> Deserialize<'de> for SubscriptionId<'a>
impl<'de: 'a, 'a> Deserialize<'de> for SubscriptionId<'a>
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'a> From<String> for SubscriptionId<'a>
impl<'a> From<String> for SubscriptionId<'a>
source§impl<'a> From<SubscriptionId<'a>> for Value
impl<'a> From<SubscriptionId<'a>> for Value
source§fn from(sub_id: SubscriptionId<'_>) -> Self
fn from(sub_id: SubscriptionId<'_>) -> Self
Converts to this type from the input type.
source§impl<'a> From<u64> for SubscriptionId<'a>
impl<'a> From<u64> for SubscriptionId<'a>
source§impl<'a> Hash for SubscriptionId<'a>
impl<'a> Hash for SubscriptionId<'a>
source§impl<'a> PartialEq for SubscriptionId<'a>
impl<'a> PartialEq for SubscriptionId<'a>
source§impl<'a> Serialize for SubscriptionId<'a>
impl<'a> Serialize for SubscriptionId<'a>
source§impl<'a> TryFrom<Value> for SubscriptionId<'a>
impl<'a> TryFrom<Value> for SubscriptionId<'a>
impl<'a> Eq for SubscriptionId<'a>
impl<'a> StructuralPartialEq for SubscriptionId<'a>
Auto Trait Implementations§
impl<'a> Freeze for SubscriptionId<'a>
impl<'a> RefUnwindSafe for SubscriptionId<'a>
impl<'a> Send for SubscriptionId<'a>
impl<'a> Sync for SubscriptionId<'a>
impl<'a> Unpin for SubscriptionId<'a>
impl<'a> UnwindSafe for SubscriptionId<'a>
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
)