[][src]Struct embedded_time::units::Milliseconds

pub struct Milliseconds<T: TimeInt>(pub T);

A duration unit type

Trait Implementations

impl<Rep, RhsDur> Add<RhsDur> for Milliseconds<Rep> where
    RhsDur: Duration,
    RhsDur::Rep: TimeInt,
    Rep: TimeInt + TryFrom<RhsDur::Rep>, 
[src]

type Output = Self

The resulting type after applying the + operator.

fn add(self, rhs: RhsDur) -> Self::Output[src]

See module-level documentation for details about this type

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

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

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

impl<T: TimeInt> Display for Milliseconds<T>[src]

fn fmt(&self, f: &mut Formatter) -> Result[src]

See module-level documentation for details about this type

impl<Rep: TimeInt> Duration for Milliseconds<Rep>[src]

type Rep = Rep

The inner type of the Duration representing the count of the implementation unit

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

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

impl<Rep, OtherDur> PartialEq<OtherDur> for Milliseconds<Rep> where
    Rep: TimeInt + TryFrom<OtherDur::Rep>,
    OtherDur: Duration,
    OtherDur::Rep: TryFrom<Rep>, 
[src]

fn eq(&self, other: &OtherDur) -> bool[src]

See module-level documentation for details about this type

impl<Rep, OtherDur> PartialOrd<OtherDur> for Milliseconds<Rep> where
    Rep: TimeInt + TryFrom<OtherDur::Rep>,
    OtherDur: Duration,
    OtherDur::Rep: TryFrom<Rep>, 
[src]

fn partial_cmp(&self, other: &OtherDur) -> Option<Ordering>[src]

See module-level documentation for details about this type

impl<Rep, Dur> Rem<Dur> for Milliseconds<Rep> where
    Rep: TimeInt + TryFrom<Dur::Rep>,
    Dur: Duration
[src]

type Output = Self

The resulting type after applying the % operator.

impl<T: TimeInt> StructuralEq for Milliseconds<T>[src]

impl<Rep, RhsDur> Sub<RhsDur> for Milliseconds<Rep> where
    Rep: TimeInt + TryFrom<RhsDur::Rep>,
    RhsDur: Duration
[src]

type Output = Self

The resulting type after applying the - operator.

fn sub(self, rhs: RhsDur) -> Self::Output[src]

See module-level documentation for details about this type

impl<Rep: TimeInt> TryFrom<Duration> for Milliseconds<Rep>[src]

type Error = <Rep as TryFrom<u128>>::Error

The type returned in the event of a conversion error.

fn try_from(core_duration: Duration) -> Result<Self, Self::Error>[src]

Convert a core::time::Duration into an embedded_time::Duration

impl<Rep: TimeInt> TryFrom<Milliseconds<Rep>> for Duration[src]

type Error = <Rep as TryInto<u64>>::Error

The type returned in the event of a conversion error.

fn try_from(duration: Milliseconds<Rep>) -> Result<Self, Self::Error>[src]

Convert an embedded_time::Duration into a core::time::Duration

Auto Trait Implementations

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

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

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

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, 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.