pub struct WellKnownChannels {
pub public: ChannelKey,
pub emergency: ChannelKey,
}Expand description
The protocol’s two well-known channels, which carry rules of their own
(multicast-channels.md §Default Channels).
Held by key, so a received frame is recognized by the key that authenticated it, with no derivation per frame.
Fields§
§public: ChannelKey§emergency: ChannelKeyImplementations§
Source§impl WellKnownChannels
impl WellKnownChannels
Sourcepub const PUBLIC_NAME: &str = "public"
pub const PUBLIC_NAME: &str = "public"
The canonical name of the public channel.
Sourcepub const EMERGENCY_NAME: &str = "emergency"
pub const EMERGENCY_NAME: &str = "emergency"
The canonical name of the EMERGENCY channel, after case folding.
Sourcepub fn derive() -> Self
pub fn derive() -> Self
Derive both keys from their canonical names, rather than writing them down as literals that could drift from the derivation every other named channel goes through.
pub fn is_public(&self, key: &ChannelKey) -> bool
pub fn is_emergency(&self, key: &ChannelKey) -> bool
Trait Implementations§
Source§impl Clone for WellKnownChannels
impl Clone for WellKnownChannels
Source§fn clone(&self) -> WellKnownChannels
fn clone(&self) -> WellKnownChannels
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 moreimpl Copy for WellKnownChannels
Auto Trait Implementations§
impl Freeze for WellKnownChannels
impl RefUnwindSafe for WellKnownChannels
impl Send for WellKnownChannels
impl Sync for WellKnownChannels
impl Unpin for WellKnownChannels
impl UnwindSafe for WellKnownChannels
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)