pub struct ChannelId { /* private fields */ }Expand description
A channel identifier: name + cached canonical hash.
Implementations§
Source§impl ChannelId
impl ChannelId
Sourcepub fn new(name: ChannelName) -> ChannelId
pub fn new(name: ChannelName) -> ChannelId
Create a new channel ID.
Sourcepub fn name(&self) -> &ChannelName
pub fn name(&self) -> &ChannelName
Get the channel name.
Sourcepub fn hash(&self) -> u64
pub fn hash(&self) -> u64
Get the cached canonical ChannelHash (32-bit).
Used as the substrate-wide key for auth, storage, and config.
Sourcepub fn wire_hash(&self) -> u16
pub fn wire_hash(&self) -> u16
Get the wire u16 hash for stamping the NetHeader fast-path.
Derived from the canonical hash by truncation; the wire u16 is a
fast-path filter hint that may collide, while ChannelId::hash
(canonical u32) is the ACL/storage key.
Trait Implementations§
impl Eq for ChannelId
impl StructuralPartialEq for ChannelId
Auto Trait Implementations§
impl Freeze for ChannelId
impl RefUnwindSafe for ChannelId
impl Send for ChannelId
impl Sync for ChannelId
impl Unpin for ChannelId
impl UnsafeUnpin for ChannelId
impl UnwindSafe for ChannelId
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> CallHasher for T
impl<T> CallHasher for T
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.