[][src]Struct embedded_time::duration::Milliseconds

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

A duration unit type

Implementations

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

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

Trait Implementations

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

type Output = Self

The resulting type after applying the + operator.

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

See Add/Sub

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: Default + TimeInt> Default for Milliseconds<T>[src]

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

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

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

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

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

type T = T

The integer (magnitude) type

fn new(value: Self::T) -> Self[src]

fn integer(&self) -> &Self::T[src]

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

impl<T: TimeInt> From<Microseconds<T>> for Milliseconds<T>[src]

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

impl<T: TimeInt> From<Milliseconds<T>> for Generic<T>[src]

impl<T: TimeInt> From<Milliseconds<T>> for Hours<T>[src]

impl<T: TimeInt> From<Milliseconds<T>> for Minutes<T>[src]

impl<T: TimeInt> From<Milliseconds<T>> for Seconds<T>[src]

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

type Output = Self

The resulting type after applying the % operator.

fn rem(self, rhs: Rhs) -> Self::Output[src]

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

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

type Output = Self

The resulting type after applying the - operator.

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

See Add/Sub

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

type Error = ConversionError

The type returned in the event of a conversion error.

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

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

type Error = ConversionError

The type returned in the event of a conversion error.

fn try_from(generic_duration: Generic<SourceInt>) -> Result<Self, Self::Error>[src]

impl<T: TimeInt> TryFrom<Hours<T>> for Milliseconds<T>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

fn try_from(big: Hours<T>) -> Result<Self, Self::Error>[src]

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

type Error = ConversionError

The type returned in the event of a conversion error.

fn try_from(big: Hours<u64>) -> Result<Self, Self::Error>[src]

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

type Error = ConversionError

The type returned in the event of a conversion error.

fn try_from(small: Microseconds<u64>) -> Result<Self, Self::Error>[src]

impl<T: TimeInt> TryFrom<Milliseconds<T>> for Duration where
    u64: From<T>, 
[src]

type Error = ConversionError

The type returned in the event of a conversion error.

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

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

type Error = ConversionError

The type returned in the event of a conversion error.

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

impl<T: TimeInt> TryFrom<Milliseconds<T>> for Microseconds<T>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

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

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

type Error = ConversionError

The type returned in the event of a conversion error.

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

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

type Error = ConversionError

The type returned in the event of a conversion error.

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

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

type Error = ConversionError

The type returned in the event of a conversion error.

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

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

type Error = ConversionError

The type returned in the event of a conversion error.

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

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

type Error = ConversionError

The type returned in the event of a conversion error.

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

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

type Error = ConversionError

The type returned in the event of a conversion error.

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

impl<T: TimeInt> TryFrom<Minutes<T>> for Milliseconds<T>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

fn try_from(big: Minutes<T>) -> Result<Self, Self::Error>[src]

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

type Error = ConversionError

The type returned in the event of a conversion error.

fn try_from(big: Minutes<u64>) -> Result<Self, Self::Error>[src]

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

type Error = ConversionError

The type returned in the event of a conversion error.

fn try_from(small: Nanoseconds<u64>) -> Result<Self, Self::Error>[src]

impl<T: TimeInt> TryFrom<Seconds<T>> for Milliseconds<T>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

fn try_from(big: Seconds<T>) -> Result<Self, Self::Error>[src]

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

type Error = ConversionError

The type returned in the event of a conversion error.

fn try_from(big: Seconds<u64>) -> Result<Self, Self::Error>[src]

Auto Trait Implementations

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

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

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

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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.