pub struct ChannelTag(pub [u8; 16]);Expand description
Sixteen-byte channel tag: a local identity for a channel, wide enough to
distinguish channels that a ChannelId cannot.
The two-byte identifier is a hint, and collisions between distinct channel keys are legal — a frame belongs to whichever channel key authenticates it, not to whichever key derives the same identifier. Bookkeeping that has no key at hand to authenticate against therefore needs a wider name; this is that name. Nothing on the wire carries it.
Tuple Fields§
§0: [u8; 16]Implementations§
Source§impl ChannelTag
impl ChannelTag
Sourcepub fn channel_id(&self) -> ChannelId
pub fn channel_id(&self) -> ChannelId
The channel identifier this tag begins with.
Both come from the same derivation, so the identifier is the tag’s own first two bytes rather than a separate computation.
Trait Implementations§
Source§impl Clone for ChannelTag
impl Clone for ChannelTag
Source§fn clone(&self) -> ChannelTag
fn clone(&self) -> ChannelTag
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ChannelTag
impl Debug for ChannelTag
Source§impl Hash for ChannelTag
impl Hash for ChannelTag
Source§impl Ord for ChannelTag
impl Ord for ChannelTag
Source§impl PartialEq for ChannelTag
impl PartialEq for ChannelTag
Source§impl PartialOrd for ChannelTag
impl PartialOrd for ChannelTag
impl Copy for ChannelTag
impl Eq for ChannelTag
impl StructuralPartialEq for ChannelTag
Auto Trait Implementations§
impl Freeze for ChannelTag
impl RefUnwindSafe for ChannelTag
impl Send for ChannelTag
impl Sync for ChannelTag
impl Unpin for ChannelTag
impl UnwindSafe for ChannelTag
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)