[][src]Struct srt::SeqNumber

pub struct SeqNumber(pub u32);

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.

impl AddAssign<u32> for SeqNumber[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]

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

impl PartialEq<SeqNumber> for SeqNumber[src]

impl PartialOrd<SeqNumber> for SeqNumber[src]

impl Rem<u32> for SeqNumber[src]

type Output = u32

The resulting type after applying the % operator.

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.

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.

impl TryFrom<u32> for SeqNumber[src]

type Error = OutOfRangeError

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,