pub struct PacketSpace { /* private fields */ }Expand description
Per encryption-level packet-number space: next send, largest received, and a 64-bit sliding replay bitmap (bit 0 = largest received).
Implementations§
Source§impl PacketSpace
impl PacketSpace
Sourcepub fn allocate_send(&mut self) -> Result<PacketNumber, QdnfError>
pub fn allocate_send(&mut self) -> Result<PacketNumber, QdnfError>
Allocate next send pn. After MAX_PACKET_NUMBER → QdnfError::Expired.
Sourcepub fn accept_receive(&mut self, pn: PacketNumber) -> Result<(), QdnfError>
pub fn accept_receive(&mut self, pn: PacketNumber) -> Result<(), QdnfError>
Accept a received pn. Duplicate or too old → QdnfError::Replay.
pn > MAX_PACKET_NUMBER → QdnfError::Range.
Trait Implementations§
Source§impl Clone for PacketSpace
impl Clone for PacketSpace
impl Copy for PacketSpace
Source§impl Debug for PacketSpace
impl Debug for PacketSpace
impl Eq for PacketSpace
Source§impl PartialEq for PacketSpace
impl PartialEq for PacketSpace
impl StructuralPartialEq for PacketSpace
Auto Trait Implementations§
impl Freeze for PacketSpace
impl RefUnwindSafe for PacketSpace
impl Send for PacketSpace
impl Sync for PacketSpace
impl Unpin for PacketSpace
impl UnsafeUnpin for PacketSpace
impl UnwindSafe for PacketSpace
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more