pub struct MsgNumber(pub u32);Tuple Fields§
§0: u32Implementations§
Trait Implementations§
Source§impl AddAssign<u32> for MsgNumber
impl AddAssign<u32> for MsgNumber
Source§fn add_assign(&mut self, rhs: u32)
fn add_assign(&mut self, rhs: u32)
Performs the
+= operation. Read moreimpl Copy for MsgNumber
Source§impl Distribution<MsgNumber> for Standard
impl Distribution<MsgNumber> for Standard
impl Eq for MsgNumber
Source§impl Ord for MsgNumber
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 MsgNumber
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 MsgNumber
impl PartialOrd for MsgNumber
impl StructuralPartialEq for MsgNumber
Source§impl Sub for MsgNumber
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 MsgNumber
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 MsgNumber
impl RefUnwindSafe for MsgNumber
impl Send for MsgNumber
impl Sync for MsgNumber
impl Unpin for MsgNumber
impl UnsafeUnpin for MsgNumber
impl UnwindSafe for MsgNumber
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.