pub struct SubscriptionId(/* private fields */);Expand description
Public identifier for a single subscription (S2b / D225: promoted
from pub(crate)). Returned by Core::subscribe /
Core::try_subscribe; pair it with the node_id you subscribed
and pass both to Core::unsubscribe to deregister.
S2b retires the core-level RAII Subscription/WeakCore (D223:
the Core is owned by value and relocates between workers, so a
parameterless Drop cannot reach it without Weak<C>/unsafe —
D225). Drop-convenience is a binding-layer RAII wrapper over
Core::unsubscribe, used only where the holder co-owns the Core
on its affinity worker (test harness, napi BenchCore). Substrate
callers (e.g. producer upstream-sub cleanup, D229) unsubscribe
explicitly via the owner-driven chain.
Trait Implementations§
Source§impl Clone for SubscriptionId
impl Clone for SubscriptionId
Source§fn clone(&self) -> SubscriptionId
fn clone(&self) -> SubscriptionId
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 Hash for SubscriptionId
impl Hash for SubscriptionId
Source§impl PartialEq for SubscriptionId
impl PartialEq for SubscriptionId
Source§fn eq(&self, other: &SubscriptionId) -> bool
fn eq(&self, other: &SubscriptionId) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy 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 UnsafeUnpin 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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.