pub struct CompactState {
pub handle: u32,
pub revision: u64,
pub received: OpNumber,
pub received_bytes: u64,
}Expand description
An authenticated channel handle plus cumulative receive counters. Handles bind peer, link session, configuration, view, receive epoch and base at full channel opening. They must never be recycled within a link session.
Fields§
§handle: u32Nonzero alias issued at full channel opening.
revision: u64Monotonic receiver report revision.
received: OpNumberLast retained operation, never a persistence vote.
received_bytes: u64Cumulative canonical bytes retained within this channel.
Implementations§
Source§impl CompactState
impl CompactState
Sourcepub fn from_report(handle: u32, report: Report) -> Result<Self, WireError>
pub fn from_report(handle: u32, report: Report) -> Result<Self, WireError>
Copy counters without changing their confirmation or durability meaning.
Sourcepub fn encode(self) -> Result<[u8; 29], WireError>
pub fn encode(self) -> Result<[u8; 29], WireError>
Exact network order: opcode, u32 handle, five u64 counters.
Trait Implementations§
Source§impl Clone for CompactState
impl Clone for CompactState
impl Copy for CompactState
Source§impl Debug for CompactState
impl Debug for CompactState
impl Eq for CompactState
Source§impl PartialEq for CompactState
impl PartialEq for CompactState
impl StructuralPartialEq for CompactState
Auto Trait Implementations§
impl Freeze for CompactState
impl RefUnwindSafe for CompactState
impl Send for CompactState
impl Sync for CompactState
impl Unpin for CompactState
impl UnsafeUnpin for CompactState
impl UnwindSafe for CompactState
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