pub struct SeqNumber(pub u32);Tuple Fields§
§0: u32Implementations§
Trait Implementations§
Source§impl AddAssign<u32> for SeqNumber
impl AddAssign<u32> for SeqNumber
Source§fn add_assign(&mut self, rhs: u32)
fn add_assign(&mut self, rhs: u32)
Performs the
+= operation. Read moreimpl Copy for SeqNumber
Source§impl Distribution<SeqNumber> for Standard
impl Distribution<SeqNumber> for Standard
impl Eq for SeqNumber
Source§impl<'a> FromIterator<&'a SeqNumber> for CompressedLossList
impl<'a> FromIterator<&'a SeqNumber> for CompressedLossList
Source§impl FromIterator<SeqNumber> for CompressedLossList
impl FromIterator<SeqNumber> for CompressedLossList
Source§impl Ord for SeqNumber
Ordering sequence numbers is difficult, as they are modular
How it works is if the absolute value of the difference between sequence numbers is greater than
MAX_DIFF, then wrapping is assumed
impl Ord for SeqNumber
Ordering sequence numbers is difficult, as they are modular How it works is if the absolute value of the difference between sequence numbers is greater than MAX_DIFF, then wrapping is assumed
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for SeqNumber
impl PartialOrd for SeqNumber
impl StructuralPartialEq for SeqNumber
Source§impl Sub for SeqNumber
Gets the distance between two sequence numbers
Always measured with first one first and the second one second
ie: SeqNumber(0) - SeqNumber(MAX) == 1
and SeqNumber(1) - SeqNumber(0) == 1
impl Sub for SeqNumber
Gets the distance between two sequence numbers Always measured with first one first and the second one second ie: SeqNumber(0) - SeqNumber(MAX) == 1 and SeqNumber(1) - SeqNumber(0) == 1
Auto Trait Implementations§
impl Freeze for SeqNumber
impl RefUnwindSafe for SeqNumber
impl Send for SeqNumber
impl Sync for SeqNumber
impl Unpin for SeqNumber
impl UnsafeUnpin for SeqNumber
impl UnwindSafe for SeqNumber
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
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,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.