pub struct MsgNumber(pub u32);
Tuple Fields§
§0: u32
Implementations§
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 moreSource§impl Distribution<MsgNumber> for Standard
impl Distribution<MsgNumber> for Standard
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
Source§impl PartialOrd for MsgNumber
impl PartialOrd for MsgNumber
Source§impl Sub<u32> for MsgNumber
Move a sequence number backwards by an offset
ie: SeqNumber(3) - 2 == 1
and SeqNumber(0) - 1 == SeqNumber(MAX)
impl Sub<u32> for MsgNumber
Move a sequence number backwards by an offset ie: SeqNumber(3) - 2 == 1 and SeqNumber(0) - 1 == SeqNumber(MAX)
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
impl Copy for MsgNumber
impl Eq for MsgNumber
impl StructuralPartialEq for MsgNumber
Auto Trait Implementations§
impl Freeze for MsgNumber
impl RefUnwindSafe for MsgNumber
impl Send for MsgNumber
impl Sync for MsgNumber
impl Unpin 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
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.