[−][src]Struct srt_protocol::SeqNumber
Implementations
impl SeqNumber
[src]
pub const MAX: u32
[src]
pub const MAX_DIFF: u32
[src]
pub fn new_truncate(from: u32) -> SeqNumber
[src]
pub fn new(from: u32) -> Result<SeqNumber, OutOfRangeError>
[src]
pub fn as_raw(&self) -> u32
[src]
Trait Implementations
impl Add<u32> for SeqNumber
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, other: u32) -> Self
[src]
impl AddAssign<u32> for SeqNumber
[src]
fn add_assign(&mut self, rhs: u32)
[src]
impl Clone for SeqNumber
[src]
impl Copy for SeqNumber
[src]
impl Debug for SeqNumber
[src]
impl Display for SeqNumber
[src]
impl Distribution<SeqNumber> for Standard
[src]
fn sample<T: Rng + ?Sized>(&self, rng: &mut T) -> SeqNumber
[src]
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T> where
R: Rng,
[src]
R: Rng,
impl Eq for SeqNumber
[src]
impl Ord for SeqNumber
[src]
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
fn cmp(&self, other: &Self) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<SeqNumber> for SeqNumber
[src]
impl PartialOrd<SeqNumber> for SeqNumber
[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl Rem<u32> for SeqNumber
[src]
type Output = u32
The resulting type after applying the %
operator.
fn rem(self, other: u32) -> Self::Output
[src]
impl StructuralEq for SeqNumber
[src]
impl StructuralPartialEq for SeqNumber
[src]
impl Sub<SeqNumber> for SeqNumber
[src]
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
type Output = u32
The resulting type after applying the -
operator.
fn sub(self, other: Self) -> Self::Output
[src]
impl Sub<u32> for SeqNumber
[src]
Move a sequence number backwards by an offset ie: SeqNumber(3) - 2 == 1 and SeqNumber(0) - 1 == SeqNumber(MAX)
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, other: u32) -> Self
[src]
impl TryFrom<u32> for SeqNumber
[src]
Auto Trait Implementations
impl RefUnwindSafe for SeqNumber
impl Send for SeqNumber
impl Sync for SeqNumber
impl Unpin for SeqNumber
impl UnwindSafe for SeqNumber
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,