Struct embedded_time::rate::Baud [−][src]
pub struct Baud<T: TimeInt = u32>(pub T);
Expand description
Baud
Implementations
Trait Implementations
impl<T: TimeInt> Display for Baud<T>[src]
impl<T: TimeInt> Display for Baud<T>[src]fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]
fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]See Formatting
impl<T: TimeInt> FixedPoint for Baud<T>[src]
impl<T: TimeInt> FixedPoint for Baud<T>[src]type T = T
type T = TThe integer (magnitude) type
const SCALING_FACTOR: Fraction[src]
const SCALING_FACTOR: Fraction[src]The fractional scaling factor
fn new(value: Self::T) -> Self[src]
fn checked_mul(&self, rhs: &Self::T) -> Option<Self>[src]
fn checked_mul(&self, rhs: &Self::T) -> Option<Self>[src]Multiply with overflow checking
fn checked_div(&self, rhs: &Self::T) -> Option<Self>[src]
fn checked_div(&self, rhs: &Self::T) -> Option<Self>[src]Multiply with overflow checking
impl<T: Ord + TimeInt> Ord for Baud<T>[src]
impl<T: Ord + TimeInt> Ord for Baud<T>[src]impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Baud<RhsInt>> for Mebibaud<T> where
Baud<RhsInt>: PartialEq<Mebibaud<T>>, [src]
impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Baud<RhsInt>> for Mebibaud<T> where
Baud<RhsInt>: PartialEq<Mebibaud<T>>, [src]impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Baud<RhsInt>> for Kibibaud<T> where
Baud<RhsInt>: PartialEq<Kibibaud<T>>, [src]
impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Baud<RhsInt>> for Kibibaud<T> where
Baud<RhsInt>: PartialEq<Kibibaud<T>>, [src]impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Baud<RhsInt>> for Megabaud<T> where
Baud<RhsInt>: PartialEq<Megabaud<T>>, [src]
impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Baud<RhsInt>> for Megabaud<T> where
Baud<RhsInt>: PartialEq<Megabaud<T>>, [src]impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Baud<RhsInt>> for Kilobaud<T> where
Baud<RhsInt>: PartialEq<Kilobaud<T>>, [src]
impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Baud<RhsInt>> for Kilobaud<T> where
Baud<RhsInt>: PartialEq<Kilobaud<T>>, [src]impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Baud<RhsInt>> for Baud<T> where
T: TryFrom<RhsInt>, [src]
impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Baud<RhsInt>> for Baud<T> where
T: TryFrom<RhsInt>, [src]impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Kibibaud<RhsInt>> for Baud<T> where
Self: TryFrom<Kibibaud<RhsInt>>, [src]
impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Kibibaud<RhsInt>> for Baud<T> where
Self: TryFrom<Kibibaud<RhsInt>>, [src]impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Kilobaud<RhsInt>> for Baud<T> where
Self: TryFrom<Kilobaud<RhsInt>>, [src]
impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Kilobaud<RhsInt>> for Baud<T> where
Self: TryFrom<Kilobaud<RhsInt>>, [src]impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Mebibaud<RhsInt>> for Baud<T> where
Self: TryFrom<Mebibaud<RhsInt>>, [src]
impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Mebibaud<RhsInt>> for Baud<T> where
Self: TryFrom<Mebibaud<RhsInt>>, [src]impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Megabaud<RhsInt>> for Baud<T> where
Self: TryFrom<Megabaud<RhsInt>>, [src]
impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Megabaud<RhsInt>> for Baud<T> where
Self: TryFrom<Megabaud<RhsInt>>, [src]impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Baud<RhsInt>> for Mebibaud<T> where
Baud<RhsInt>: TryFrom<Self> + Ord, [src]
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Baud<RhsInt>> for Mebibaud<T> where
Baud<RhsInt>: TryFrom<Self> + Ord, [src]fn partial_cmp(&self, rhs: &Baud<RhsInt>) -> Option<Ordering>[src]
fn partial_cmp(&self, rhs: &Baud<RhsInt>) -> Option<Ordering>[src]See Comparisons
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Baud<RhsInt>> for Kibibaud<T> where
Baud<RhsInt>: TryFrom<Self> + Ord, [src]
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Baud<RhsInt>> for Kibibaud<T> where
Baud<RhsInt>: TryFrom<Self> + Ord, [src]fn partial_cmp(&self, rhs: &Baud<RhsInt>) -> Option<Ordering>[src]
fn partial_cmp(&self, rhs: &Baud<RhsInt>) -> Option<Ordering>[src]See Comparisons
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Baud<RhsInt>> for Megabaud<T> where
Baud<RhsInt>: TryFrom<Self> + Ord, [src]
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Baud<RhsInt>> for Megabaud<T> where
Baud<RhsInt>: TryFrom<Self> + Ord, [src]fn partial_cmp(&self, rhs: &Baud<RhsInt>) -> Option<Ordering>[src]
fn partial_cmp(&self, rhs: &Baud<RhsInt>) -> Option<Ordering>[src]See Comparisons
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Baud<RhsInt>> for Kilobaud<T> where
Baud<RhsInt>: TryFrom<Self> + Ord, [src]
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Baud<RhsInt>> for Kilobaud<T> where
Baud<RhsInt>: TryFrom<Self> + Ord, [src]fn partial_cmp(&self, rhs: &Baud<RhsInt>) -> Option<Ordering>[src]
fn partial_cmp(&self, rhs: &Baud<RhsInt>) -> Option<Ordering>[src]See Comparisons
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Baud<RhsInt>> for Baud<T> where
T: TryFrom<RhsInt>, [src]
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Baud<RhsInt>> for Baud<T> where
T: TryFrom<RhsInt>, [src]fn partial_cmp(&self, rhs: &Baud<RhsInt>) -> Option<Ordering>[src]
fn partial_cmp(&self, rhs: &Baud<RhsInt>) -> Option<Ordering>[src]See Comparisons
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Kibibaud<RhsInt>> for Baud<T> where
Self: TryFrom<Kibibaud<RhsInt>>, [src]
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Kibibaud<RhsInt>> for Baud<T> where
Self: TryFrom<Kibibaud<RhsInt>>, [src]fn partial_cmp(&self, rhs: &Kibibaud<RhsInt>) -> Option<Ordering>[src]
fn partial_cmp(&self, rhs: &Kibibaud<RhsInt>) -> Option<Ordering>[src]See Comparisons
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Kilobaud<RhsInt>> for Baud<T> where
Self: TryFrom<Kilobaud<RhsInt>>, [src]
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Kilobaud<RhsInt>> for Baud<T> where
Self: TryFrom<Kilobaud<RhsInt>>, [src]fn partial_cmp(&self, rhs: &Kilobaud<RhsInt>) -> Option<Ordering>[src]
fn partial_cmp(&self, rhs: &Kilobaud<RhsInt>) -> Option<Ordering>[src]See Comparisons
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Mebibaud<RhsInt>> for Baud<T> where
Self: TryFrom<Mebibaud<RhsInt>>, [src]
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Mebibaud<RhsInt>> for Baud<T> where
Self: TryFrom<Mebibaud<RhsInt>>, [src]fn partial_cmp(&self, rhs: &Mebibaud<RhsInt>) -> Option<Ordering>[src]
fn partial_cmp(&self, rhs: &Mebibaud<RhsInt>) -> Option<Ordering>[src]See Comparisons
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Megabaud<RhsInt>> for Baud<T> where
Self: TryFrom<Megabaud<RhsInt>>, [src]
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Megabaud<RhsInt>> for Baud<T> where
Self: TryFrom<Megabaud<RhsInt>>, [src]fn partial_cmp(&self, rhs: &Megabaud<RhsInt>) -> Option<Ordering>[src]
fn partial_cmp(&self, rhs: &Megabaud<RhsInt>) -> Option<Ordering>[src]See Comparisons
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl<T: TimeInt> Rate for Baud<T>[src]
impl<T: TimeInt> Rate for Baud<T>[src]fn to_generic<DestInt: TimeInt>(
self,
scaling_factor: Fraction
) -> Result<Generic<DestInt>, ConversionError> where
Self: FixedPoint,
DestInt: TryFrom<Self::T>, [src]
fn to_generic<DestInt: TimeInt>(
self,
scaling_factor: Fraction
) -> Result<Generic<DestInt>, ConversionError> where
Self: FixedPoint,
DestInt: TryFrom<Self::T>, [src]fn to_duration<Duration: Duration>(&self) -> Result<Duration, ConversionError> where
Duration: FixedPoint,
Self: FixedPoint,
Duration::T: TryFrom<Self::T>, [src]
fn to_duration<Duration: Duration>(&self) -> Result<Duration, ConversionError> where
Duration: FixedPoint,
Self: FixedPoint,
Duration::T: TryFrom<Self::T>, [src]impl TryFrom<Baud<u64>> for Mebibaud<u32>[src]
impl TryFrom<Baud<u64>> for Mebibaud<u32>[src]type Error = ConversionError
type Error = ConversionErrorThe type returned in the event of a conversion error.
impl TryFrom<Baud<u64>> for Kibibaud<u32>[src]
impl TryFrom<Baud<u64>> for Kibibaud<u32>[src]type Error = ConversionError
type Error = ConversionErrorThe type returned in the event of a conversion error.
impl TryFrom<Baud<u64>> for Megabaud<u32>[src]
impl TryFrom<Baud<u64>> for Megabaud<u32>[src]type Error = ConversionError
type Error = ConversionErrorThe type returned in the event of a conversion error.
impl TryFrom<Baud<u64>> for Kilobaud<u32>[src]
impl TryFrom<Baud<u64>> for Kilobaud<u32>[src]type Error = ConversionError
type Error = ConversionErrorThe type returned in the event of a conversion error.
impl TryFrom<Baud<u64>> for Baud<u32>[src]
impl TryFrom<Baud<u64>> for Baud<u32>[src]type Error = ConversionError
type Error = ConversionErrorThe type returned in the event of a conversion error.
impl<SourceInt: TimeInt, DestInt: TimeInt> TryFrom<Generic<SourceInt>> for Baud<DestInt> where
DestInt: TryFrom<SourceInt>, [src]
impl<SourceInt: TimeInt, DestInt: TimeInt> TryFrom<Generic<SourceInt>> for Baud<DestInt> where
DestInt: TryFrom<SourceInt>, [src]impl<T: TimeInt> TryFrom<Kibibaud<T>> for Baud<T>[src]
impl<T: TimeInt> TryFrom<Kibibaud<T>> for Baud<T>[src]type Error = ConversionError
type Error = ConversionErrorThe type returned in the event of a conversion error.
impl TryFrom<Kibibaud<u64>> for Baud<u32>[src]
impl TryFrom<Kibibaud<u64>> for Baud<u32>[src]type Error = ConversionError
type Error = ConversionErrorThe type returned in the event of a conversion error.
impl<T: TimeInt> TryFrom<Kilobaud<T>> for Baud<T>[src]
impl<T: TimeInt> TryFrom<Kilobaud<T>> for Baud<T>[src]type Error = ConversionError
type Error = ConversionErrorThe type returned in the event of a conversion error.
impl TryFrom<Kilobaud<u64>> for Baud<u32>[src]
impl TryFrom<Kilobaud<u64>> for Baud<u32>[src]type Error = ConversionError
type Error = ConversionErrorThe type returned in the event of a conversion error.
impl<T: TimeInt> TryFrom<Mebibaud<T>> for Baud<T>[src]
impl<T: TimeInt> TryFrom<Mebibaud<T>> for Baud<T>[src]type Error = ConversionError
type Error = ConversionErrorThe type returned in the event of a conversion error.
impl TryFrom<Mebibaud<u64>> for Baud<u32>[src]
impl TryFrom<Mebibaud<u64>> for Baud<u32>[src]type Error = ConversionError
type Error = ConversionErrorThe type returned in the event of a conversion error.
impl<T: TimeInt> TryFrom<Megabaud<T>> for Baud<T>[src]
impl<T: TimeInt> TryFrom<Megabaud<T>> for Baud<T>[src]type Error = ConversionError
type Error = ConversionErrorThe type returned in the event of a conversion error.
impl TryFrom<Megabaud<u64>> for Baud<u32>[src]
impl TryFrom<Megabaud<u64>> for Baud<u32>[src]type Error = ConversionError
type Error = ConversionErrorThe type returned in the event of a conversion error.
impl<T: Copy + TimeInt> Copy for Baud<T>[src]
impl<T: Eq + TimeInt> Eq for Baud<T>[src]
impl<T: TimeInt> StructuralEq for Baud<T>[src]
Auto Trait Implementations
impl<T> Send for Baud<T> where
T: Send,
T: Send,
impl<T> Sync for Baud<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Baud<T> where
T: Unpin,
T: Unpin,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T, Rhs, Output> NumOps<Rhs, Output> for T where
T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>, [src]
T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,