pub struct ChannelState<const RN: usize = 8, const HN: usize = 8> {
pub channel_key: ChannelKey,
pub derived: DerivedChannelKeys,
pub replay: LinearMap<PeerId, ReplayWindow, RN>,
pub hint_replay: LinearMap<NodeHint, HintReplayState, HN>,
}Expand description
Shared state for one multicast channel.
Fields§
§channel_key: ChannelKeyRaw channel key.
derived: DerivedChannelKeysDerived transport keys and identifier.
replay: LinearMap<PeerId, ReplayWindow, RN>Replay windows for peers resolved to full identities.
hint_replay: LinearMap<NodeHint, HintReplayState, HN>Replay windows for senders known only by hint.
Implementations§
Source§impl<const RN: usize, const HN: usize> ChannelState<RN, HN>
impl<const RN: usize, const HN: usize> ChannelState<RN, HN>
Sourcepub fn new(channel_key: ChannelKey, derived: DerivedChannelKeys) -> Self
pub fn new(channel_key: ChannelKey, derived: DerivedChannelKeys) -> Self
Create a new channel-state record.
Trait Implementations§
Source§impl<const RN: usize, const HN: usize> Clone for ChannelState<RN, HN>
impl<const RN: usize, const HN: usize> Clone for ChannelState<RN, HN>
Source§fn clone(&self) -> ChannelState<RN, HN>
fn clone(&self) -> ChannelState<RN, HN>
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 moreAuto Trait Implementations§
impl<const RN: usize, const HN: usize> Freeze for ChannelState<RN, HN>
impl<const RN: usize, const HN: usize> RefUnwindSafe for ChannelState<RN, HN>
impl<const RN: usize, const HN: usize> Send for ChannelState<RN, HN>
impl<const RN: usize, const HN: usize> Sync for ChannelState<RN, HN>
impl<const RN: usize, const HN: usize> Unpin for ChannelState<RN, HN>
impl<const RN: usize, const HN: usize> UnwindSafe for ChannelState<RN, HN>
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)