[−][src]Struct srt_protocol::MsgNumber
Implementations
impl MsgNumber[src]
pub const MAX: u32[src]
pub const MAX_DIFF: u32[src]
pub fn new_truncate(from: u32) -> MsgNumber[src]
pub fn new(from: u32) -> Result<MsgNumber, OutOfRangeError>[src]
pub fn as_raw(&self) -> u32[src]
Trait Implementations
impl Add<u32> for MsgNumber[src]
type Output = Self
The resulting type after applying the + operator.
fn add(self, other: u32) -> Self[src]
impl AddAssign<u32> for MsgNumber[src]
fn add_assign(&mut self, rhs: u32)[src]
impl Clone for MsgNumber[src]
impl Copy for MsgNumber[src]
impl Debug for MsgNumber[src]
impl Display for MsgNumber[src]
impl Eq for MsgNumber[src]
impl Ord for MsgNumber[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]pub fn max(self, other: Self) -> Self1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self1.50.0[src]
impl PartialEq<MsgNumber> for MsgNumber[src]
impl PartialOrd<MsgNumber> for MsgNumber[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool1.0.0[src]
impl Rem<u32> for MsgNumber[src]
type Output = u32
The resulting type after applying the % operator.
fn rem(self, other: u32) -> Self::Output[src]
impl StructuralEq for MsgNumber[src]
impl StructuralPartialEq for MsgNumber[src]
impl Sub<MsgNumber> for MsgNumber[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 MsgNumber[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 MsgNumber[src]
Auto Trait Implementations
impl RefUnwindSafe for MsgNumber[src]
impl Send for MsgNumber[src]
impl Sync for MsgNumber[src]
impl Unpin for MsgNumber[src]
impl UnwindSafe for MsgNumber[src]
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,
pub 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.
pub fn to_owned(&self) -> T[src]
pub 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.
pub 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.
pub 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>,