pub struct Channel { /* private fields */ }Expand description
A channel descriptor — holds the key, derived ID, and display name.
Not bound to any node. Create via Channel::named (key derived from name)
or Channel::private (key independent of name).
Implementations§
Source§impl Channel
impl Channel
Sourcepub fn named(name: &str) -> Self
pub fn named(name: &str) -> Self
Create a named channel whose key is derived from the name.
Uses the same derivation as the MAC layer’s add_named_channel.
Sourcepub fn private(key: ChannelKey, name: &str) -> Self
pub fn private(key: ChannelKey, name: &str) -> Self
Create a private channel with an explicit key.
The name is for display only — it does not affect the key.
Sourcepub fn channel_id(&self) -> &ChannelId
pub fn channel_id(&self) -> &ChannelId
The derived 2-byte channel ID (used for routing/filtering).
Sourcepub fn key(&self) -> &ChannelKey
pub fn key(&self) -> &ChannelKey
The full symmetric channel key.
Trait Implementations§
impl Eq for Channel
Auto Trait Implementations§
impl Freeze for Channel
impl RefUnwindSafe for Channel
impl Send for Channel
impl Sync for Channel
impl Unpin for Channel
impl UnwindSafe for Channel
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)