Struct embedded_time::duration::Nanoseconds [−][src]
Expand description
A duration unit type
Tuple Fields
0: T
Implementations
Trait Implementations
impl<T: TimeInt, Rhs: Duration> Add<Rhs> for Nanoseconds<T> where
Rhs: FixedPoint,
Self: TryFrom<Rhs>,
impl<T: TimeInt, Rhs: Duration> Add<Rhs> for Nanoseconds<T> where
Rhs: FixedPoint,
Self: TryFrom<Rhs>,
Returns the “default value” for a type. Read more
See Formatting
fn to_generic<DestInt: TimeInt>(
self,
scaling_factor: Fraction
) -> Result<Generic<DestInt>, ConversionError> where
Self: FixedPoint,
DestInt: TryFrom<Self::T>,
fn to_generic<DestInt: TimeInt>(
self,
scaling_factor: Fraction
) -> Result<Generic<DestInt>, ConversionError> where
Self: FixedPoint,
DestInt: TryFrom<Self::T>,
Construct a Generic
Duration
from a named Duration
(eg.
Milliseconds
) Read more
fn to_rate<Rate: Rate>(&self) -> Result<Rate, ConversionError> where
Rate: FixedPoint,
Self: FixedPoint,
Rate::T: TryFrom<Self::T>,
fn to_rate<Rate: Rate>(&self) -> Result<Rate, ConversionError> where
Rate: FixedPoint,
Self: FixedPoint,
Rate::T: TryFrom<Self::T>,
type T = T
type T = T
The integer (magnitude) type
The fractional scaling factor
Multiply with overflow checking
Multiply with overflow checking
impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Microseconds<RhsInt>> for Nanoseconds<T> where
Self: TryFrom<Microseconds<RhsInt>>,
impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Microseconds<RhsInt>> for Nanoseconds<T> where
Self: TryFrom<Microseconds<RhsInt>>,
See Comparisons
impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Milliseconds<RhsInt>> for Nanoseconds<T> where
Self: TryFrom<Milliseconds<RhsInt>>,
impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Milliseconds<RhsInt>> for Nanoseconds<T> where
Self: TryFrom<Milliseconds<RhsInt>>,
See Comparisons
impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Nanoseconds<RhsInt>> for Nanoseconds<T> where
T: TryFrom<RhsInt>,
impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Nanoseconds<RhsInt>> for Nanoseconds<T> where
T: TryFrom<RhsInt>,
See Comparisons
impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Nanoseconds<RhsInt>> for Hours<T> where
Nanoseconds<RhsInt>: TryFrom<Self>,
impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Nanoseconds<RhsInt>> for Hours<T> where
Nanoseconds<RhsInt>: TryFrom<Self>,
See Comparisons
impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Nanoseconds<RhsInt>> for Minutes<T> where
Nanoseconds<RhsInt>: TryFrom<Self>,
impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Nanoseconds<RhsInt>> for Minutes<T> where
Nanoseconds<RhsInt>: TryFrom<Self>,
See Comparisons
impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Nanoseconds<RhsInt>> for Seconds<T> where
Nanoseconds<RhsInt>: TryFrom<Self>,
impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Nanoseconds<RhsInt>> for Seconds<T> where
Nanoseconds<RhsInt>: TryFrom<Self>,
See Comparisons
impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Nanoseconds<RhsInt>> for Milliseconds<T> where
Nanoseconds<RhsInt>: TryFrom<Self>,
impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Nanoseconds<RhsInt>> for Milliseconds<T> where
Nanoseconds<RhsInt>: TryFrom<Self>,
See Comparisons
impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Nanoseconds<RhsInt>> for Microseconds<T> where
Nanoseconds<RhsInt>: TryFrom<Self>,
impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Nanoseconds<RhsInt>> for Microseconds<T> where
Nanoseconds<RhsInt>: TryFrom<Self>,
See Comparisons
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Hours<RhsInt>> for Nanoseconds<T> where
Self: TryFrom<Hours<RhsInt>>,
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Hours<RhsInt>> for Nanoseconds<T> where
Self: TryFrom<Hours<RhsInt>>,
See Comparisons
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Microseconds<RhsInt>> for Nanoseconds<T> where
Self: TryFrom<Microseconds<RhsInt>>,
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Microseconds<RhsInt>> for Nanoseconds<T> where
Self: TryFrom<Microseconds<RhsInt>>,
See Comparisons
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Milliseconds<RhsInt>> for Nanoseconds<T> where
Self: TryFrom<Milliseconds<RhsInt>>,
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Milliseconds<RhsInt>> for Nanoseconds<T> where
Self: TryFrom<Milliseconds<RhsInt>>,
See Comparisons
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Minutes<RhsInt>> for Nanoseconds<T> where
Self: TryFrom<Minutes<RhsInt>>,
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Minutes<RhsInt>> for Nanoseconds<T> where
Self: TryFrom<Minutes<RhsInt>>,
See Comparisons
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Nanoseconds<RhsInt>> for Nanoseconds<T> where
T: TryFrom<RhsInt>,
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Nanoseconds<RhsInt>> for Nanoseconds<T> where
T: TryFrom<RhsInt>,
See Comparisons
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Nanoseconds<RhsInt>> for Hours<T> where
Nanoseconds<RhsInt>: TryFrom<Self>,
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Nanoseconds<RhsInt>> for Hours<T> where
Nanoseconds<RhsInt>: TryFrom<Self>,
See Comparisons
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Nanoseconds<RhsInt>> for Minutes<T> where
Nanoseconds<RhsInt>: TryFrom<Self>,
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Nanoseconds<RhsInt>> for Minutes<T> where
Nanoseconds<RhsInt>: TryFrom<Self>,
See Comparisons
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Nanoseconds<RhsInt>> for Seconds<T> where
Nanoseconds<RhsInt>: TryFrom<Self>,
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Nanoseconds<RhsInt>> for Seconds<T> where
Nanoseconds<RhsInt>: TryFrom<Self>,
See Comparisons
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Nanoseconds<RhsInt>> for Milliseconds<T> where
Nanoseconds<RhsInt>: TryFrom<Self>,
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Nanoseconds<RhsInt>> for Milliseconds<T> where
Nanoseconds<RhsInt>: TryFrom<Self>,
See Comparisons
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Nanoseconds<RhsInt>> for Microseconds<T> where
Nanoseconds<RhsInt>: TryFrom<Self>,
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Nanoseconds<RhsInt>> for Microseconds<T> where
Nanoseconds<RhsInt>: TryFrom<Self>,
See Comparisons
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Seconds<RhsInt>> for Nanoseconds<T> where
Self: TryFrom<Seconds<RhsInt>>,
impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Seconds<RhsInt>> for Nanoseconds<T> where
Self: TryFrom<Seconds<RhsInt>>,
See Comparisons
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
impl<T: TimeInt, Rhs: Duration> Rem<Rhs> for Nanoseconds<T> where
Self: TryFrom<Rhs>,
Rhs: FixedPoint,
impl<T: TimeInt, Rhs: Duration> Rem<Rhs> for Nanoseconds<T> where
Self: TryFrom<Rhs>,
Rhs: FixedPoint,
impl<T: TimeInt, Rhs: Duration> Sub<Rhs> for Nanoseconds<T> where
Self: TryFrom<Rhs>,
Rhs: FixedPoint,
impl<T: TimeInt, Rhs: Duration> Sub<Rhs> for Nanoseconds<T> where
Self: TryFrom<Rhs>,
Rhs: FixedPoint,
type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.