Struct srt_protocol::packet::MsgNumber
source[−]pub struct MsgNumber(pub u32);
Tuple Fields
0: u32
Implementations
Trait Implementations
Performs the +=
operation. Read more
Generate a random value of T
, using rng
as the source of randomness.
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
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
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
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
Move a sequence number backwards by an offset ie: SeqNumber(3) - 2 == 1 and SeqNumber(0) - 1 == SeqNumber(MAX)
Auto Trait Implementations
impl RefUnwindSafe for MsgNumber
impl UnwindSafe for MsgNumber
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.