Struct drv8825::embedded_time::duration::Nanoseconds[][src]

pub struct Nanoseconds<T = u32>(pub T)
where
    T: TimeInt
;

A duration unit type

Implementations

impl<T> Nanoseconds<T> where
    T: TimeInt, 
[src]

pub fn new(value: T) -> Nanoseconds<T>[src]

Trait Implementations

impl<T, Rhs> Add<Rhs> for Nanoseconds<T> where
    T: TimeInt,
    Rhs: Duration + FixedPoint,
    Nanoseconds<T>: TryFrom<Rhs>, 
[src]

type Output = Nanoseconds<T>

The resulting type after applying the + operator.

pub fn add(self, rhs: Rhs) -> <Nanoseconds<T> as Add<Rhs>>::Output[src]

See Add/Sub

impl<T> Clone for Nanoseconds<T> where
    T: TimeInt + Clone
[src]

impl<T> Copy for Nanoseconds<T> where
    T: TimeInt + Copy
[src]

impl<T> Debug for Nanoseconds<T> where
    T: TimeInt + Debug
[src]

impl<T> Default for Nanoseconds<T> where
    T: TimeInt + Default
[src]

impl<T> Display for Nanoseconds<T> where
    T: TimeInt, 
[src]

pub fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>[src]

impl<T> Div<T> for Nanoseconds<T> where
    T: TimeInt, 
[src]

type Output = Nanoseconds<T>

The resulting type after applying the / operator.

pub fn div(self, rhs: T) -> <Nanoseconds<T> as Div<T>>::Output[src]

See Mul/Div

impl<T> Duration for Nanoseconds<T> where
    T: TimeInt, 
[src]

impl<T> Eq for Nanoseconds<T> where
    T: TimeInt + Eq
[src]

impl<T> FixedPoint for Nanoseconds<T> where
    T: TimeInt, 
[src]

type T = T

The integer (magnitude) type

pub fn new(value: <Nanoseconds<T> as FixedPoint>::T) -> Nanoseconds<T>[src]

pub fn integer(&self) -> &<Nanoseconds<T> as FixedPoint>::T[src]

impl From<Hours<u32>> for Nanoseconds<u64>[src]

impl From<Microseconds<u32>> for Nanoseconds<u64>[src]

impl From<Milliseconds<u32>> for Nanoseconds<u64>[src]

impl From<Minutes<u32>> for Nanoseconds<u64>[src]

impl<T> From<Nanoseconds<T>> for Microseconds<T> where
    T: TimeInt, 
[src]

impl<T> From<Nanoseconds<T>> for Milliseconds<T> where
    T: TimeInt, 
[src]

impl<T> From<Nanoseconds<T>> for Generic<T> where
    T: TimeInt, 
[src]

impl<T> From<Nanoseconds<T>> for Minutes<T> where
    T: TimeInt, 
[src]

impl<T> From<Nanoseconds<T>> for Seconds<T> where
    T: TimeInt, 
[src]

impl<T> From<Nanoseconds<T>> for Hours<T> where
    T: TimeInt, 
[src]

impl From<Nanoseconds<u32>> for Milliseconds<u64>[src]

impl From<Nanoseconds<u32>> for Microseconds<u64>[src]

impl From<Nanoseconds<u32>> for Minutes<u64>[src]

impl From<Nanoseconds<u32>> for Nanoseconds<u64>[src]

impl From<Nanoseconds<u32>> for Seconds<u64>[src]

impl From<Nanoseconds<u32>> for Hours<u64>[src]

impl From<Seconds<u32>> for Nanoseconds<u64>[src]

impl<T> Hash for Nanoseconds<T> where
    T: TimeInt + Hash
[src]

impl<T> Mul<T> for Nanoseconds<T> where
    T: TimeInt, 
[src]

type Output = Nanoseconds<T>

The resulting type after applying the * operator.

pub fn mul(self, rhs: T) -> <Nanoseconds<T> as Mul<T>>::Output[src]

See Mul/Div

impl<T> Ord for Nanoseconds<T> where
    T: TimeInt + Ord
[src]

impl<T, RhsInt> PartialEq<Hours<RhsInt>> for Nanoseconds<T> where
    T: TimeInt,
    RhsInt: TimeInt,
    Nanoseconds<T>: TryFrom<Hours<RhsInt>>, 
[src]

pub fn eq(&self, rhs: &Hours<RhsInt>) -> bool[src]

impl<T, RhsInt> PartialEq<Microseconds<RhsInt>> for Nanoseconds<T> where
    T: TimeInt,
    RhsInt: TimeInt,
    Nanoseconds<T>: TryFrom<Microseconds<RhsInt>>, 
[src]

pub fn eq(&self, rhs: &Microseconds<RhsInt>) -> bool[src]

impl<T, RhsInt> PartialEq<Milliseconds<RhsInt>> for Nanoseconds<T> where
    T: TimeInt,
    RhsInt: TimeInt,
    Nanoseconds<T>: TryFrom<Milliseconds<RhsInt>>, 
[src]

pub fn eq(&self, rhs: &Milliseconds<RhsInt>) -> bool[src]

impl<T, RhsInt> PartialEq<Minutes<RhsInt>> for Nanoseconds<T> where
    T: TimeInt,
    RhsInt: TimeInt,
    Nanoseconds<T>: TryFrom<Minutes<RhsInt>>, 
[src]

pub fn eq(&self, rhs: &Minutes<RhsInt>) -> bool[src]

impl<T, RhsInt> PartialEq<Nanoseconds<RhsInt>> for Seconds<T> where
    T: TimeInt,
    RhsInt: TimeInt,
    Nanoseconds<RhsInt>: TryFrom<Seconds<T>>, 
[src]

pub fn eq(&self, rhs: &Nanoseconds<RhsInt>) -> bool[src]

impl<T, RhsInt> PartialEq<Nanoseconds<RhsInt>> for Milliseconds<T> where
    T: TimeInt,
    RhsInt: TimeInt,
    Nanoseconds<RhsInt>: TryFrom<Milliseconds<T>>, 
[src]

pub fn eq(&self, rhs: &Nanoseconds<RhsInt>) -> bool[src]

impl<T, RhsInt> PartialEq<Nanoseconds<RhsInt>> for Microseconds<T> where
    T: TimeInt,
    RhsInt: TimeInt,
    Nanoseconds<RhsInt>: TryFrom<Microseconds<T>>, 
[src]

pub fn eq(&self, rhs: &Nanoseconds<RhsInt>) -> bool[src]

impl<T, RhsInt> PartialEq<Nanoseconds<RhsInt>> for Minutes<T> where
    T: TimeInt,
    RhsInt: TimeInt,
    Nanoseconds<RhsInt>: TryFrom<Minutes<T>>, 
[src]

pub fn eq(&self, rhs: &Nanoseconds<RhsInt>) -> bool[src]

impl<T, RhsInt> PartialEq<Nanoseconds<RhsInt>> for Nanoseconds<T> where
    T: TimeInt + TryFrom<RhsInt>,
    RhsInt: TimeInt, 
[src]

pub fn eq(&self, rhs: &Nanoseconds<RhsInt>) -> bool[src]

impl<T, RhsInt> PartialEq<Nanoseconds<RhsInt>> for Hours<T> where
    T: TimeInt,
    RhsInt: TimeInt,
    Nanoseconds<RhsInt>: TryFrom<Hours<T>>, 
[src]

pub fn eq(&self, rhs: &Nanoseconds<RhsInt>) -> bool[src]

impl<T, RhsInt> PartialEq<Seconds<RhsInt>> for Nanoseconds<T> where
    T: TimeInt,
    RhsInt: TimeInt,
    Nanoseconds<T>: TryFrom<Seconds<RhsInt>>, 
[src]

pub fn eq(&self, rhs: &Seconds<RhsInt>) -> bool[src]

impl<T, RhsInt> PartialOrd<Hours<RhsInt>> for Nanoseconds<T> where
    T: TimeInt,
    RhsInt: TimeInt,
    Nanoseconds<T>: TryFrom<Hours<RhsInt>>, 
[src]

pub fn partial_cmp(&self, rhs: &Hours<RhsInt>) -> Option<Ordering>[src]

impl<T, RhsInt> PartialOrd<Microseconds<RhsInt>> for Nanoseconds<T> where
    T: TimeInt,
    RhsInt: TimeInt,
    Nanoseconds<T>: TryFrom<Microseconds<RhsInt>>, 
[src]

pub fn partial_cmp(&self, rhs: &Microseconds<RhsInt>) -> Option<Ordering>[src]

impl<T, RhsInt> PartialOrd<Milliseconds<RhsInt>> for Nanoseconds<T> where
    T: TimeInt,
    RhsInt: TimeInt,
    Nanoseconds<T>: TryFrom<Milliseconds<RhsInt>>, 
[src]

pub fn partial_cmp(&self, rhs: &Milliseconds<RhsInt>) -> Option<Ordering>[src]

impl<T, RhsInt> PartialOrd<Minutes<RhsInt>> for Nanoseconds<T> where
    T: TimeInt,
    RhsInt: TimeInt,
    Nanoseconds<T>: TryFrom<Minutes<RhsInt>>, 
[src]

pub fn partial_cmp(&self, rhs: &Minutes<RhsInt>) -> Option<Ordering>[src]

impl<T, RhsInt> PartialOrd<Nanoseconds<RhsInt>> for Nanoseconds<T> where
    T: TimeInt + TryFrom<RhsInt>,
    RhsInt: TimeInt, 
[src]

pub fn partial_cmp(&self, rhs: &Nanoseconds<RhsInt>) -> Option<Ordering>[src]

impl<T, RhsInt> PartialOrd<Nanoseconds<RhsInt>> for Seconds<T> where
    T: TimeInt,
    RhsInt: TimeInt,
    Nanoseconds<RhsInt>: TryFrom<Seconds<T>>, 
[src]

pub fn partial_cmp(&self, rhs: &Nanoseconds<RhsInt>) -> Option<Ordering>[src]

impl<T, RhsInt> PartialOrd<Nanoseconds<RhsInt>> for Milliseconds<T> where
    T: TimeInt,
    RhsInt: TimeInt,
    Nanoseconds<RhsInt>: TryFrom<Milliseconds<T>>, 
[src]

pub fn partial_cmp(&self, rhs: &Nanoseconds<RhsInt>) -> Option<Ordering>[src]

impl<T, RhsInt> PartialOrd<Nanoseconds<RhsInt>> for Hours<T> where
    T: TimeInt,
    RhsInt: TimeInt,
    Nanoseconds<RhsInt>: TryFrom<Hours<T>>, 
[src]

pub fn partial_cmp(&self, rhs: &Nanoseconds<RhsInt>) -> Option<Ordering>[src]

impl<T, RhsInt> PartialOrd<Nanoseconds<RhsInt>> for Microseconds<T> where
    T: TimeInt,
    RhsInt: TimeInt,
    Nanoseconds<RhsInt>: TryFrom<Microseconds<T>>, 
[src]

pub fn partial_cmp(&self, rhs: &Nanoseconds<RhsInt>) -> Option<Ordering>[src]

impl<T, RhsInt> PartialOrd<Nanoseconds<RhsInt>> for Minutes<T> where
    T: TimeInt,
    RhsInt: TimeInt,
    Nanoseconds<RhsInt>: TryFrom<Minutes<T>>, 
[src]

pub fn partial_cmp(&self, rhs: &Nanoseconds<RhsInt>) -> Option<Ordering>[src]

impl<T, RhsInt> PartialOrd<Seconds<RhsInt>> for Nanoseconds<T> where
    T: TimeInt,
    RhsInt: TimeInt,
    Nanoseconds<T>: TryFrom<Seconds<RhsInt>>, 
[src]

pub fn partial_cmp(&self, rhs: &Seconds<RhsInt>) -> Option<Ordering>[src]

impl<T, Rhs> Rem<Rhs> for Nanoseconds<T> where
    T: TimeInt,
    Rhs: Duration + FixedPoint,
    Nanoseconds<T>: TryFrom<Rhs>, 
[src]

type Output = Nanoseconds<T>

The resulting type after applying the % operator.

pub fn rem(self, rhs: Rhs) -> <Nanoseconds<T> as Rem<Rhs>>::Output[src]

impl<T> StructuralEq for Nanoseconds<T> where
    T: TimeInt, 
[src]

impl<T, Rhs> Sub<Rhs> for Nanoseconds<T> where
    T: TimeInt,
    Rhs: Duration + FixedPoint,
    Nanoseconds<T>: TryFrom<Rhs>, 
[src]

type Output = Nanoseconds<T>

The resulting type after applying the - operator.

pub fn sub(self, rhs: Rhs) -> <Nanoseconds<T> as Sub<Rhs>>::Output[src]

See Add/Sub

impl<T> TryFrom<Duration> for Nanoseconds<T> where
    T: TimeInt + TryFrom<u128>, 
[src]

type Error = ConversionError

The type returned in the event of a conversion error.

pub fn try_from(
    core_duration: Duration
) -> Result<Nanoseconds<T>, <Nanoseconds<T> as TryFrom<Duration>>::Error>
[src]

impl<SourceInt, DestInt> TryFrom<Generic<SourceInt>> for Nanoseconds<DestInt> where
    DestInt: TimeInt + TryFrom<SourceInt>,
    SourceInt: TimeInt, 
[src]

type Error = ConversionError

The type returned in the event of a conversion error.

pub fn try_from(
    generic_duration: Generic<SourceInt>
) -> Result<Nanoseconds<DestInt>, <Nanoseconds<DestInt> as TryFrom<Generic<SourceInt>>>::Error>
[src]

impl<T> TryFrom<Hours<T>> for Nanoseconds<T> where
    T: TimeInt, 
[src]

type Error = ConversionError

The type returned in the event of a conversion error.

pub fn try_from(
    big: Hours<T>
) -> Result<Nanoseconds<T>, <Nanoseconds<T> as TryFrom<Hours<T>>>::Error>
[src]

impl TryFrom<Hours<u64>> for Nanoseconds<u32>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

pub fn try_from(
    big: Hours<u64>
) -> Result<Nanoseconds<u32>, <Nanoseconds<u32> as TryFrom<Hours<u64>>>::Error>
[src]

impl<T> TryFrom<Microseconds<T>> for Nanoseconds<T> where
    T: TimeInt, 
[src]

type Error = ConversionError

The type returned in the event of a conversion error.

pub fn try_from(
    big: Microseconds<T>
) -> Result<Nanoseconds<T>, <Nanoseconds<T> as TryFrom<Microseconds<T>>>::Error>
[src]

impl TryFrom<Microseconds<u64>> for Nanoseconds<u32>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

pub fn try_from(
    big: Microseconds<u64>
) -> Result<Nanoseconds<u32>, <Nanoseconds<u32> as TryFrom<Microseconds<u64>>>::Error>
[src]

impl<T> TryFrom<Milliseconds<T>> for Nanoseconds<T> where
    T: TimeInt, 
[src]

type Error = ConversionError

The type returned in the event of a conversion error.

pub fn try_from(
    big: Milliseconds<T>
) -> Result<Nanoseconds<T>, <Nanoseconds<T> as TryFrom<Milliseconds<T>>>::Error>
[src]

impl TryFrom<Milliseconds<u64>> for Nanoseconds<u32>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

pub fn try_from(
    big: Milliseconds<u64>
) -> Result<Nanoseconds<u32>, <Nanoseconds<u32> as TryFrom<Milliseconds<u64>>>::Error>
[src]

impl<T> TryFrom<Minutes<T>> for Nanoseconds<T> where
    T: TimeInt, 
[src]

type Error = ConversionError

The type returned in the event of a conversion error.

pub fn try_from(
    big: Minutes<T>
) -> Result<Nanoseconds<T>, <Nanoseconds<T> as TryFrom<Minutes<T>>>::Error>
[src]

impl TryFrom<Minutes<u64>> for Nanoseconds<u32>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

pub fn try_from(
    big: Minutes<u64>
) -> Result<Nanoseconds<u32>, <Nanoseconds<u32> as TryFrom<Minutes<u64>>>::Error>
[src]

impl TryFrom<Nanoseconds<u64>> for Minutes<u32>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

pub fn try_from(
    small: Nanoseconds<u64>
) -> Result<Minutes<u32>, <Minutes<u32> as TryFrom<Nanoseconds<u64>>>::Error>
[src]

impl TryFrom<Nanoseconds<u64>> for Seconds<u32>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

pub fn try_from(
    small: Nanoseconds<u64>
) -> Result<Seconds<u32>, <Seconds<u32> as TryFrom<Nanoseconds<u64>>>::Error>
[src]

impl TryFrom<Nanoseconds<u64>> for Microseconds<u32>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

pub fn try_from(
    small: Nanoseconds<u64>
) -> Result<Microseconds<u32>, <Microseconds<u32> as TryFrom<Nanoseconds<u64>>>::Error>
[src]

impl TryFrom<Nanoseconds<u64>> for Milliseconds<u32>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

pub fn try_from(
    small: Nanoseconds<u64>
) -> Result<Milliseconds<u32>, <Milliseconds<u32> as TryFrom<Nanoseconds<u64>>>::Error>
[src]

impl TryFrom<Nanoseconds<u64>> for Nanoseconds<u32>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

pub fn try_from(
    source: Nanoseconds<u64>
) -> Result<Nanoseconds<u32>, <Nanoseconds<u32> as TryFrom<Nanoseconds<u64>>>::Error>
[src]

impl TryFrom<Nanoseconds<u64>> for Hours<u32>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

pub fn try_from(
    small: Nanoseconds<u64>
) -> Result<Hours<u32>, <Hours<u32> as TryFrom<Nanoseconds<u64>>>::Error>
[src]

impl<T> TryFrom<Seconds<T>> for Nanoseconds<T> where
    T: TimeInt, 
[src]

type Error = ConversionError

The type returned in the event of a conversion error.

pub fn try_from(
    big: Seconds<T>
) -> Result<Nanoseconds<T>, <Nanoseconds<T> as TryFrom<Seconds<T>>>::Error>
[src]

impl TryFrom<Seconds<u64>> for Nanoseconds<u32>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

pub fn try_from(
    big: Seconds<u64>
) -> Result<Nanoseconds<u32>, <Nanoseconds<u32> as TryFrom<Seconds<u64>>>::Error>
[src]

Auto Trait Implementations

impl<T> Send for Nanoseconds<T> where
    T: Send

impl<T> Sync for Nanoseconds<T> where
    T: Sync

impl<T> Unpin for Nanoseconds<T> where
    T: Unpin

Blanket Implementations

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

impl<T> Az for T[src]

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

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

impl<T> CheckedAs for T[src]

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

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

impl<Src, Dst> LosslessTryInto<Dst> for Src where
    Dst: LosslessTryFrom<Src>, 
[src]

impl<Src, Dst> LossyInto<Dst> for Src where
    Dst: LossyFrom<Src>, 
[src]

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]

impl<T> OverflowingAs for T[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SaturatingAs for T[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<T> UnwrappedAs for T[src]

impl<T> WrappingAs for T[src]