[][src]Struct embedded_time::duration::Seconds

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

A duration unit type

Implementations

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

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

Trait Implementations

impl<T: TimeInt, Rhs: Duration> Add<Rhs> for Seconds<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 Seconds<T>[src]

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

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

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

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

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

impl<T: TimeInt> Div<T> for Seconds<T>[src]

type Output = Self

The resulting type after applying the / operator.

fn div(self, rhs: T) -> Self::Output[src]

See Mul/Div

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

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

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

type T = T

The integer (magnitude) type

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

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

impl From<Duration> for Seconds<u64>[src]

fn from(core_duration: Duration) -> Self[src]

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

impl<T: TimeInt> Mul<T> for Seconds<T>[src]

type Output = Self

The resulting type after applying the * operator.

fn mul(self, rhs: T) -> Self::Output[src]

See Mul/Div

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

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

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

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

fn eq(&self, rhs: &Microseconds<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<Minutes<RhsInt>> for Seconds<T> where
    Self: TryFrom<Minutes<RhsInt>>, 
[src]

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

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

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

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

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

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

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

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

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

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

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

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

fn eq(&self, rhs: &Seconds<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 Seconds<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 Seconds<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 Seconds<T> where
    Milliseconds<RhsInt>: TryFrom<Self>, 
[src]

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

impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Minutes<RhsInt>> for Seconds<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 Seconds<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 Seconds<T> where
    T: TryFrom<RhsInt>, 
[src]

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

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

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

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

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

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

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

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

fn partial_cmp(&self, rhs: &Seconds<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 Seconds<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 Seconds<T>[src]

impl<T: TimeInt, Rhs: Duration> Sub<Rhs> for Seconds<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 TryFrom<Duration> for Seconds<u32>[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 Seconds<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 Seconds<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 Seconds<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 Seconds<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 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<T: TimeInt> TryFrom<Minutes<T>> for Seconds<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 Seconds<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 Seconds<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 Nanoseconds<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<T: TimeInt> TryFrom<Seconds<T>> for Microseconds<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<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<u32>> for Duration[src]

type Error = ConversionError

The type returned in the event of a conversion error.

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

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

type Error = ConversionError

The type returned in the event of a conversion error.

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

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

type Error = ConversionError

The type returned in the event of a conversion error.

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

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

type Error = ConversionError

The type returned in the event of a conversion error.

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

impl TryFrom<Seconds<u64>> for Nanoseconds<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]

impl TryFrom<Seconds<u64>> for Microseconds<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]

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 Seconds<T> where
    T: RefUnwindSafe

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

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

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

impl<T> UnwindSafe for Seconds<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, 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> 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.