Struct nostr_sdk::SubscriptionId
source · pub struct SubscriptionId(/* private fields */);
Expand description
Subscription ID
Implementations§
source§impl SubscriptionId
impl SubscriptionId
sourcepub fn new<S>(id: S) -> SubscriptionIdwhere
S: Into<String>,
pub fn new<S>(id: S) -> SubscriptionIdwhere S: Into<String>,
Create new SubscriptionId
sourcepub fn generate() -> SubscriptionId
pub fn generate() -> SubscriptionId
Generate new random SubscriptionId
sourcepub fn generate_with_rng<R>(rng: &mut R) -> SubscriptionIdwhere
R: RngCore,
pub fn generate_with_rng<R>(rng: &mut R) -> SubscriptionIdwhere R: RngCore,
Generate new random SubscriptionId
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<'de> Deserialize<'de> for SubscriptionId
impl<'de> Deserialize<'de> for SubscriptionId
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<SubscriptionId, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<SubscriptionId, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for SubscriptionId
impl Display for SubscriptionId
source§impl Hash for SubscriptionId
impl Hash for SubscriptionId
source§impl Ord for SubscriptionId
impl Ord for SubscriptionId
source§fn cmp(&self, other: &SubscriptionId) -> Ordering
fn cmp(&self, other: &SubscriptionId) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<SubscriptionId> for SubscriptionId
impl PartialEq<SubscriptionId> for SubscriptionId
source§fn 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 ==
.source§impl PartialOrd<SubscriptionId> for SubscriptionId
impl PartialOrd<SubscriptionId> for SubscriptionId
source§fn partial_cmp(&self, other: &SubscriptionId) -> Option<Ordering>
fn partial_cmp(&self, other: &SubscriptionId) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for SubscriptionId
impl Serialize for SubscriptionId
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more
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§
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.