Trait drv8825::embedded_time::duration::_ [−][src]
Fixed-point value type
QX.32 where X: bit-width of T
Associated Types
Loading content...Associated Constants
pub const SCALING_FACTOR: Fraction
[src]
The fractional scaling factor
Required methods
pub fn integer(&self) -> &Self::T
[src]
Returns the integer part of the FixedPoint
value
assert_eq!(Hertz(45_u32).integer(), &45_u32);
Provided methods
pub fn checked_mul(&self, rhs: &Self::T) -> Option<Self>
[src]
Multiply with overflow checking
pub fn checked_div(&self, rhs: &Self::T) -> Option<Self>
[src]
Multiply with overflow checking
pub fn min_value() -> Self::T
[src]
Returns the minimum integer value
pub fn max_value() -> Self::T
[src]
Returns the maximum integer value
Implementors
impl<T> FixedPoint for Hours<T> where
T: TimeInt,
[src]
T: TimeInt,
type T = T
pub const SCALING_FACTOR: Fraction
[src]
pub fn new(value: <Hours<T> as FixedPoint>::T) -> Hours<T>
[src]
pub fn integer(&self) -> &<Hours<T> as FixedPoint>::T
[src]
impl<T> FixedPoint for Microseconds<T> where
T: TimeInt,
[src]
T: TimeInt,
type T = T
pub const SCALING_FACTOR: Fraction
[src]
pub fn new(value: <Microseconds<T> as FixedPoint>::T) -> Microseconds<T>
[src]
pub fn integer(&self) -> &<Microseconds<T> as FixedPoint>::T
[src]
impl<T> FixedPoint for Milliseconds<T> where
T: TimeInt,
[src]
T: TimeInt,
type T = T
pub const SCALING_FACTOR: Fraction
[src]
pub fn new(value: <Milliseconds<T> as FixedPoint>::T) -> Milliseconds<T>
[src]
pub fn integer(&self) -> &<Milliseconds<T> as FixedPoint>::T
[src]
impl<T> FixedPoint for Minutes<T> where
T: TimeInt,
[src]
T: TimeInt,
type T = T
pub const SCALING_FACTOR: Fraction
[src]
pub fn new(value: <Minutes<T> as FixedPoint>::T) -> Minutes<T>
[src]
pub fn integer(&self) -> &<Minutes<T> as FixedPoint>::T
[src]
impl<T> FixedPoint for Nanoseconds<T> where
T: TimeInt,
[src]
T: TimeInt,
type T = T
pub const SCALING_FACTOR: Fraction
[src]
pub fn new(value: <Nanoseconds<T> as FixedPoint>::T) -> Nanoseconds<T>
[src]
pub fn integer(&self) -> &<Nanoseconds<T> as FixedPoint>::T
[src]
impl<T> FixedPoint for Seconds<T> where
T: TimeInt,
[src]
T: TimeInt,
type T = T
pub const SCALING_FACTOR: Fraction
[src]
pub fn new(value: <Seconds<T> as FixedPoint>::T) -> Seconds<T>
[src]
pub fn integer(&self) -> &<Seconds<T> as FixedPoint>::T
[src]
impl<T> FixedPoint for Baud<T> where
T: TimeInt,
[src]
T: TimeInt,
type T = T
pub const SCALING_FACTOR: Fraction
[src]
pub fn new(value: <Baud<T> as FixedPoint>::T) -> Baud<T>
[src]
pub fn integer(&self) -> &<Baud<T> as FixedPoint>::T
[src]
impl<T> FixedPoint for BitsPerSecond<T> where
T: TimeInt,
[src]
T: TimeInt,
type T = T
pub const SCALING_FACTOR: Fraction
[src]
pub fn new(value: <BitsPerSecond<T> as FixedPoint>::T) -> BitsPerSecond<T>
[src]
pub fn integer(&self) -> &<BitsPerSecond<T> as FixedPoint>::T
[src]
impl<T> FixedPoint for BytesPerSecond<T> where
T: TimeInt,
[src]
T: TimeInt,
type T = T
pub const SCALING_FACTOR: Fraction
[src]
pub fn new(value: <BytesPerSecond<T> as FixedPoint>::T) -> BytesPerSecond<T>
[src]
pub fn integer(&self) -> &<BytesPerSecond<T> as FixedPoint>::T
[src]
impl<T> FixedPoint for Hertz<T> where
T: TimeInt,
[src]
T: TimeInt,
type T = T
pub const SCALING_FACTOR: Fraction
[src]
pub fn new(value: <Hertz<T> as FixedPoint>::T) -> Hertz<T>
[src]
pub fn integer(&self) -> &<Hertz<T> as FixedPoint>::T
[src]
impl<T> FixedPoint for Kibibaud<T> where
T: TimeInt,
[src]
T: TimeInt,
type T = T
pub const SCALING_FACTOR: Fraction
[src]
pub fn new(value: <Kibibaud<T> as FixedPoint>::T) -> Kibibaud<T>
[src]
pub fn integer(&self) -> &<Kibibaud<T> as FixedPoint>::T
[src]
impl<T> FixedPoint for KibibitsPerSecond<T> where
T: TimeInt,
[src]
T: TimeInt,
type T = T
pub const SCALING_FACTOR: Fraction
[src]
pub fn new(
value: <KibibitsPerSecond<T> as FixedPoint>::T
) -> KibibitsPerSecond<T>
[src]
value: <KibibitsPerSecond<T> as FixedPoint>::T
) -> KibibitsPerSecond<T>
pub fn integer(&self) -> &<KibibitsPerSecond<T> as FixedPoint>::T
[src]
impl<T> FixedPoint for KibibytesPerSecond<T> where
T: TimeInt,
[src]
T: TimeInt,
type T = T
pub const SCALING_FACTOR: Fraction
[src]
pub fn new(
value: <KibibytesPerSecond<T> as FixedPoint>::T
) -> KibibytesPerSecond<T>
[src]
value: <KibibytesPerSecond<T> as FixedPoint>::T
) -> KibibytesPerSecond<T>
pub fn integer(&self) -> &<KibibytesPerSecond<T> as FixedPoint>::T
[src]
impl<T> FixedPoint for Kibihertz<T> where
T: TimeInt,
[src]
T: TimeInt,
type T = T
pub const SCALING_FACTOR: Fraction
[src]
pub fn new(value: <Kibihertz<T> as FixedPoint>::T) -> Kibihertz<T>
[src]
pub fn integer(&self) -> &<Kibihertz<T> as FixedPoint>::T
[src]
impl<T> FixedPoint for Kilobaud<T> where
T: TimeInt,
[src]
T: TimeInt,
type T = T
pub const SCALING_FACTOR: Fraction
[src]
pub fn new(value: <Kilobaud<T> as FixedPoint>::T) -> Kilobaud<T>
[src]
pub fn integer(&self) -> &<Kilobaud<T> as FixedPoint>::T
[src]
impl<T> FixedPoint for KilobitsPerSecond<T> where
T: TimeInt,
[src]
T: TimeInt,
type T = T
pub const SCALING_FACTOR: Fraction
[src]
pub fn new(
value: <KilobitsPerSecond<T> as FixedPoint>::T
) -> KilobitsPerSecond<T>
[src]
value: <KilobitsPerSecond<T> as FixedPoint>::T
) -> KilobitsPerSecond<T>
pub fn integer(&self) -> &<KilobitsPerSecond<T> as FixedPoint>::T
[src]
impl<T> FixedPoint for KilobytesPerSecond<T> where
T: TimeInt,
[src]
T: TimeInt,
type T = T
pub const SCALING_FACTOR: Fraction
[src]
pub fn new(
value: <KilobytesPerSecond<T> as FixedPoint>::T
) -> KilobytesPerSecond<T>
[src]
value: <KilobytesPerSecond<T> as FixedPoint>::T
) -> KilobytesPerSecond<T>
pub fn integer(&self) -> &<KilobytesPerSecond<T> as FixedPoint>::T
[src]
impl<T> FixedPoint for Kilohertz<T> where
T: TimeInt,
[src]
T: TimeInt,
type T = T
pub const SCALING_FACTOR: Fraction
[src]
pub fn new(value: <Kilohertz<T> as FixedPoint>::T) -> Kilohertz<T>
[src]
pub fn integer(&self) -> &<Kilohertz<T> as FixedPoint>::T
[src]
impl<T> FixedPoint for Mebibaud<T> where
T: TimeInt,
[src]
T: TimeInt,
type T = T
pub const SCALING_FACTOR: Fraction
[src]
pub fn new(value: <Mebibaud<T> as FixedPoint>::T) -> Mebibaud<T>
[src]
pub fn integer(&self) -> &<Mebibaud<T> as FixedPoint>::T
[src]
impl<T> FixedPoint for MebibitsPerSecond<T> where
T: TimeInt,
[src]
T: TimeInt,
type T = T
pub const SCALING_FACTOR: Fraction
[src]
pub fn new(
value: <MebibitsPerSecond<T> as FixedPoint>::T
) -> MebibitsPerSecond<T>
[src]
value: <MebibitsPerSecond<T> as FixedPoint>::T
) -> MebibitsPerSecond<T>
pub fn integer(&self) -> &<MebibitsPerSecond<T> as FixedPoint>::T
[src]
impl<T> FixedPoint for MebibytesPerSecond<T> where
T: TimeInt,
[src]
T: TimeInt,
type T = T
pub const SCALING_FACTOR: Fraction
[src]
pub fn new(
value: <MebibytesPerSecond<T> as FixedPoint>::T
) -> MebibytesPerSecond<T>
[src]
value: <MebibytesPerSecond<T> as FixedPoint>::T
) -> MebibytesPerSecond<T>
pub fn integer(&self) -> &<MebibytesPerSecond<T> as FixedPoint>::T
[src]
impl<T> FixedPoint for Mebihertz<T> where
T: TimeInt,
[src]
T: TimeInt,
type T = T
pub const SCALING_FACTOR: Fraction
[src]
pub fn new(value: <Mebihertz<T> as FixedPoint>::T) -> Mebihertz<T>
[src]
pub fn integer(&self) -> &<Mebihertz<T> as FixedPoint>::T
[src]
impl<T> FixedPoint for Megabaud<T> where
T: TimeInt,
[src]
T: TimeInt,
type T = T
pub const SCALING_FACTOR: Fraction
[src]
pub fn new(value: <Megabaud<T> as FixedPoint>::T) -> Megabaud<T>
[src]
pub fn integer(&self) -> &<Megabaud<T> as FixedPoint>::T
[src]
impl<T> FixedPoint for MegabitsPerSecond<T> where
T: TimeInt,
[src]
T: TimeInt,
type T = T
pub const SCALING_FACTOR: Fraction
[src]
pub fn new(
value: <MegabitsPerSecond<T> as FixedPoint>::T
) -> MegabitsPerSecond<T>
[src]
value: <MegabitsPerSecond<T> as FixedPoint>::T
) -> MegabitsPerSecond<T>
pub fn integer(&self) -> &<MegabitsPerSecond<T> as FixedPoint>::T
[src]
impl<T> FixedPoint for MegabytesPerSecond<T> where
T: TimeInt,
[src]
T: TimeInt,
type T = T
pub const SCALING_FACTOR: Fraction
[src]
pub fn new(
value: <MegabytesPerSecond<T> as FixedPoint>::T
) -> MegabytesPerSecond<T>
[src]
value: <MegabytesPerSecond<T> as FixedPoint>::T
) -> MegabytesPerSecond<T>
pub fn integer(&self) -> &<MegabytesPerSecond<T> as FixedPoint>::T
[src]
impl<T> FixedPoint for Megahertz<T> where
T: TimeInt,
[src]
T: TimeInt,