Struct lpc55_hal::time::Microseconds [−][src]
pub struct Microseconds<T = u32>(pub T)
where
T: TimeInt;
Expand description
A duration unit type
Implementations
Trait Implementations
impl<T, Rhs> Add<Rhs> for Microseconds<T> where
T: TimeInt,
Rhs: Duration + FixedPoint,
Microseconds<T>: TryFrom<Rhs>,
[src]
impl<T, Rhs> Add<Rhs> for Microseconds<T> where
T: TimeInt,
Rhs: Duration + FixedPoint,
Microseconds<T>: TryFrom<Rhs>,
[src]type Output = Microseconds<T>
type Output = Microseconds<T>
The resulting type after applying the +
operator.
Returns the “default value” for a type. Read more
type Output = Microseconds<T>
type Output = Microseconds<T>
The resulting type after applying the /
operator.
fn to_generic<DestInt>(
self,
scaling_factor: Fraction
) -> Result<Generic<DestInt>, ConversionError> where
Self: FixedPoint,
DestInt: TimeInt + TryFrom<Self::T>,
[src]
fn to_generic<DestInt>(
self,
scaling_factor: Fraction
) -> Result<Generic<DestInt>, ConversionError> where
Self: FixedPoint,
DestInt: TimeInt + TryFrom<Self::T>,
[src]Construct a Generic
Duration
from a named Duration
(eg.
Milliseconds
) Read more
fn to_rate<Rate>(&self) -> Result<Rate, ConversionError> where
Self: FixedPoint,
Rate: Rate + FixedPoint,
<Rate as FixedPoint>::T: TryFrom<Self::T>,
[src]
fn to_rate<Rate>(&self) -> Result<Rate, ConversionError> where
Self: FixedPoint,
Rate: Rate + FixedPoint,
<Rate as FixedPoint>::T: TryFrom<Self::T>,
[src]type T = T
type T = T
The integer (magnitude) type
The fractional scaling factor
Multiply with overflow checking
Multiply with overflow checking
type Output = Microseconds<T>
type Output = Microseconds<T>
The resulting type after applying the *
operator.
impl<T, RhsInt> PartialEq<Hours<RhsInt>> for Microseconds<T> where
T: TimeInt,
RhsInt: TimeInt,
Microseconds<T>: TryFrom<Hours<RhsInt>>,
[src]
impl<T, RhsInt> PartialEq<Hours<RhsInt>> for Microseconds<T> where
T: TimeInt,
RhsInt: TimeInt,
Microseconds<T>: TryFrom<Hours<RhsInt>>,
[src]impl<T, RhsInt> PartialEq<Microseconds<RhsInt>> for Microseconds<T> where
T: TimeInt + TryFrom<RhsInt>,
RhsInt: TimeInt,
[src]
impl<T, RhsInt> PartialEq<Microseconds<RhsInt>> for Microseconds<T> where
T: TimeInt + TryFrom<RhsInt>,
RhsInt: TimeInt,
[src]See Comparisons
impl<T, RhsInt> PartialEq<Microseconds<RhsInt>> for Seconds<T> where
T: TimeInt,
RhsInt: TimeInt,
Microseconds<RhsInt>: TryFrom<Seconds<T>>,
[src]
impl<T, RhsInt> PartialEq<Microseconds<RhsInt>> for Seconds<T> where
T: TimeInt,
RhsInt: TimeInt,
Microseconds<RhsInt>: TryFrom<Seconds<T>>,
[src]See Comparisons
impl<T, RhsInt> PartialEq<Microseconds<RhsInt>> for Milliseconds<T> where
T: TimeInt,
RhsInt: TimeInt,
Microseconds<RhsInt>: TryFrom<Milliseconds<T>>,
[src]
impl<T, RhsInt> PartialEq<Microseconds<RhsInt>> for Milliseconds<T> where
T: TimeInt,
RhsInt: TimeInt,
Microseconds<RhsInt>: TryFrom<Milliseconds<T>>,
[src]See Comparisons
impl<T, RhsInt> PartialEq<Microseconds<RhsInt>> for Nanoseconds<T> where
T: TimeInt,
RhsInt: TimeInt,
Nanoseconds<T>: TryFrom<Microseconds<RhsInt>>,
[src]
impl<T, RhsInt> PartialEq<Microseconds<RhsInt>> for Nanoseconds<T> where
T: TimeInt,
RhsInt: TimeInt,
Nanoseconds<T>: TryFrom<Microseconds<RhsInt>>,
[src]See Comparisons
impl<T, RhsInt> PartialEq<Milliseconds<RhsInt>> for Microseconds<T> where
T: TimeInt,
RhsInt: TimeInt,
Microseconds<T>: TryFrom<Milliseconds<RhsInt>>,
[src]
impl<T, RhsInt> PartialEq<Milliseconds<RhsInt>> for Microseconds<T> where
T: TimeInt,
RhsInt: TimeInt,
Microseconds<T>: TryFrom<Milliseconds<RhsInt>>,
[src]See Comparisons
impl<T, RhsInt> PartialEq<Minutes<RhsInt>> for Microseconds<T> where
T: TimeInt,
RhsInt: TimeInt,
Microseconds<T>: TryFrom<Minutes<RhsInt>>,
[src]
impl<T, RhsInt> PartialEq<Minutes<RhsInt>> for Microseconds<T> where
T: TimeInt,
RhsInt: TimeInt,
Microseconds<T>: TryFrom<Minutes<RhsInt>>,
[src]impl<T, RhsInt> PartialEq<Nanoseconds<RhsInt>> for Microseconds<T> where
T: TimeInt,
RhsInt: TimeInt,
Nanoseconds<RhsInt>: TryFrom<Microseconds<T>>,
[src]
impl<T, RhsInt> PartialEq<Nanoseconds<RhsInt>> for Microseconds<T> where
T: TimeInt,
RhsInt: TimeInt,
Nanoseconds<RhsInt>: TryFrom<Microseconds<T>>,
[src]See Comparisons
impl<T, RhsInt> PartialEq<Seconds<RhsInt>> for Microseconds<T> where
T: TimeInt,
RhsInt: TimeInt,
Microseconds<T>: TryFrom<Seconds<RhsInt>>,
[src]
impl<T, RhsInt> PartialEq<Seconds<RhsInt>> for Microseconds<T> where
T: TimeInt,
RhsInt: TimeInt,
Microseconds<T>: TryFrom<Seconds<RhsInt>>,
[src]impl<T, RhsInt> PartialOrd<Hours<RhsInt>> for Microseconds<T> where
T: TimeInt,
RhsInt: TimeInt,
Microseconds<T>: TryFrom<Hours<RhsInt>>,
[src]
impl<T, RhsInt> PartialOrd<Hours<RhsInt>> for Microseconds<T> where
T: TimeInt,
RhsInt: TimeInt,
Microseconds<T>: TryFrom<Hours<RhsInt>>,
[src]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, RhsInt> PartialOrd<Microseconds<RhsInt>> for Nanoseconds<T> where
T: TimeInt,
RhsInt: TimeInt,
Nanoseconds<T>: TryFrom<Microseconds<RhsInt>>,
[src]
impl<T, RhsInt> PartialOrd<Microseconds<RhsInt>> for Nanoseconds<T> where
T: TimeInt,
RhsInt: TimeInt,
Nanoseconds<T>: TryFrom<Microseconds<RhsInt>>,
[src]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, RhsInt> PartialOrd<Microseconds<RhsInt>> for Microseconds<T> where
T: TimeInt + TryFrom<RhsInt>,
RhsInt: TimeInt,
[src]
impl<T, RhsInt> PartialOrd<Microseconds<RhsInt>> for Microseconds<T> where
T: TimeInt + TryFrom<RhsInt>,
RhsInt: TimeInt,
[src]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, RhsInt> PartialOrd<Microseconds<RhsInt>> for Seconds<T> where
T: TimeInt,
RhsInt: TimeInt,
Microseconds<RhsInt>: TryFrom<Seconds<T>>,
[src]
impl<T, RhsInt> PartialOrd<Microseconds<RhsInt>> for Seconds<T> where
T: TimeInt,
RhsInt: TimeInt,
Microseconds<RhsInt>: TryFrom<Seconds<T>>,
[src]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, RhsInt> PartialOrd<Microseconds<RhsInt>> for Milliseconds<T> where
T: TimeInt,
RhsInt: TimeInt,
Microseconds<RhsInt>: TryFrom<Milliseconds<T>>,
[src]
impl<T, RhsInt> PartialOrd<Microseconds<RhsInt>> for Milliseconds<T> where
T: TimeInt,
RhsInt: TimeInt,
Microseconds<RhsInt>: TryFrom<Milliseconds<T>>,
[src]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, RhsInt> PartialOrd<Milliseconds<RhsInt>> for Microseconds<T> where
T: TimeInt,
RhsInt: TimeInt,
Microseconds<T>: TryFrom<Milliseconds<RhsInt>>,
[src]
impl<T, RhsInt> PartialOrd<Milliseconds<RhsInt>> for Microseconds<T> where
T: TimeInt,
RhsInt: TimeInt,
Microseconds<T>: TryFrom<Milliseconds<RhsInt>>,
[src]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, RhsInt> PartialOrd<Minutes<RhsInt>> for Microseconds<T> where
T: TimeInt,
RhsInt: TimeInt,
Microseconds<T>: TryFrom<Minutes<RhsInt>>,
[src]
impl<T, RhsInt> PartialOrd<Minutes<RhsInt>> for Microseconds<T> where
T: TimeInt,
RhsInt: TimeInt,
Microseconds<T>: TryFrom<Minutes<RhsInt>>,
[src]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, RhsInt> PartialOrd<Nanoseconds<RhsInt>> for Microseconds<T> where
T: TimeInt,
RhsInt: TimeInt,
Nanoseconds<RhsInt>: TryFrom<Microseconds<T>>,
[src]
impl<T, RhsInt> PartialOrd<Nanoseconds<RhsInt>> for Microseconds<T> where
T: TimeInt,
RhsInt: TimeInt,
Nanoseconds<RhsInt>: TryFrom<Microseconds<T>>,
[src]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, RhsInt> PartialOrd<Seconds<RhsInt>> for Microseconds<T> where
T: TimeInt,
RhsInt: TimeInt,
Microseconds<T>: TryFrom<Seconds<RhsInt>>,
[src]
impl<T, RhsInt> PartialOrd<Seconds<RhsInt>> for Microseconds<T> where
T: TimeInt,
RhsInt: TimeInt,
Microseconds<T>: TryFrom<Seconds<RhsInt>>,
[src]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, Rhs> Rem<Rhs> for Microseconds<T> where
T: TimeInt,
Rhs: Duration + FixedPoint,
Microseconds<T>: TryFrom<Rhs>,
[src]
impl<T, Rhs> Rem<Rhs> for Microseconds<T> where
T: TimeInt,
Rhs: Duration + FixedPoint,
Microseconds<T>: TryFrom<Rhs>,
[src]type Output = Microseconds<T>
type Output = Microseconds<T>
The resulting type after applying the %
operator.
impl<T, Rhs> Sub<Rhs> for Microseconds<T> where
T: TimeInt,
Rhs: Duration + FixedPoint,
Microseconds<T>: TryFrom<Rhs>,
[src]
impl<T, Rhs> Sub<Rhs> for Microseconds<T> where
T: TimeInt,
Rhs: Duration + FixedPoint,
Microseconds<T>: TryFrom<Rhs>,
[src]type Output = Microseconds<T>
type Output = Microseconds<T>
The resulting type after applying the -
operator.
pub fn try_from(
core_duration: Duration
) -> Result<Microseconds<T>, <Microseconds<T> as TryFrom<Duration>>::Error>
[src]
pub fn try_from(
core_duration: Duration
) -> Result<Microseconds<T>, <Microseconds<T> as TryFrom<Duration>>::Error>
[src]type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
pub fn try_from(
generic_duration: Generic<SourceInt>
) -> Result<Microseconds<DestInt>, <Microseconds<DestInt> as TryFrom<Generic<SourceInt>>>::Error>
[src]
pub fn try_from(
generic_duration: Generic<SourceInt>
) -> Result<Microseconds<DestInt>, <Microseconds<DestInt> as TryFrom<Generic<SourceInt>>>::Error>
[src]type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
pub fn try_from(
big: Hours<T>
) -> Result<Microseconds<T>, <Microseconds<T> as TryFrom<Hours<T>>>::Error>
[src]
pub fn try_from(
big: Hours<T>
) -> Result<Microseconds<T>, <Microseconds<T> as TryFrom<Hours<T>>>::Error>
[src]type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
pub fn try_from(
big: Hours<u64>
) -> Result<Microseconds<u32>, <Microseconds<u32> as TryFrom<Hours<u64>>>::Error>
[src]
pub fn try_from(
big: Hours<u64>
) -> Result<Microseconds<u32>, <Microseconds<u32> as TryFrom<Hours<u64>>>::Error>
[src]type Error = ConversionError
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]
pub fn try_from(
big: Microseconds<T>
) -> Result<Nanoseconds<T>, <Nanoseconds<T> as TryFrom<Microseconds<T>>>::Error>
[src]type Error = ConversionError
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]
pub fn try_from(
big: Microseconds<u64>
) -> Result<Nanoseconds<u32>, <Nanoseconds<u32> as TryFrom<Microseconds<u64>>>::Error>
[src]type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
pub fn try_from(
small: Microseconds<u64>
) -> Result<Seconds<u32>, <Seconds<u32> as TryFrom<Microseconds<u64>>>::Error>
[src]
pub fn try_from(
small: Microseconds<u64>
) -> Result<Seconds<u32>, <Seconds<u32> as TryFrom<Microseconds<u64>>>::Error>
[src]type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
pub fn try_from(
source: Microseconds<u64>
) -> Result<Microseconds<u32>, <Microseconds<u32> as TryFrom<Microseconds<u64>>>::Error>
[src]
pub fn try_from(
source: Microseconds<u64>
) -> Result<Microseconds<u32>, <Microseconds<u32> as TryFrom<Microseconds<u64>>>::Error>
[src]type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
pub fn try_from(
small: Microseconds<u64>
) -> Result<Milliseconds<u32>, <Milliseconds<u32> as TryFrom<Microseconds<u64>>>::Error>
[src]
pub fn try_from(
small: Microseconds<u64>
) -> Result<Milliseconds<u32>, <Milliseconds<u32> as TryFrom<Microseconds<u64>>>::Error>
[src]type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
pub fn try_from(
big: Milliseconds<T>
) -> Result<Microseconds<T>, <Microseconds<T> as TryFrom<Milliseconds<T>>>::Error>
[src]
pub fn try_from(
big: Milliseconds<T>
) -> Result<Microseconds<T>, <Microseconds<T> as TryFrom<Milliseconds<T>>>::Error>
[src]type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
pub fn try_from(
big: Milliseconds<u64>
) -> Result<Microseconds<u32>, <Microseconds<u32> as TryFrom<Milliseconds<u64>>>::Error>
[src]
pub fn try_from(
big: Milliseconds<u64>
) -> Result<Microseconds<u32>, <Microseconds<u32> as TryFrom<Milliseconds<u64>>>::Error>
[src]type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
pub fn try_from(
big: Minutes<T>
) -> Result<Microseconds<T>, <Microseconds<T> as TryFrom<Minutes<T>>>::Error>
[src]
pub fn try_from(
big: Minutes<T>
) -> Result<Microseconds<T>, <Microseconds<T> as TryFrom<Minutes<T>>>::Error>
[src]type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
pub fn try_from(
big: Minutes<u64>
) -> Result<Microseconds<u32>, <Microseconds<u32> as TryFrom<Minutes<u64>>>::Error>
[src]
pub fn try_from(
big: Minutes<u64>
) -> Result<Microseconds<u32>, <Microseconds<u32> as TryFrom<Minutes<u64>>>::Error>
[src]type Error = ConversionError
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]
pub fn try_from(
small: Nanoseconds<u64>
) -> Result<Microseconds<u32>, <Microseconds<u32> as TryFrom<Nanoseconds<u64>>>::Error>
[src]type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
pub fn try_from(
big: Seconds<T>
) -> Result<Microseconds<T>, <Microseconds<T> as TryFrom<Seconds<T>>>::Error>
[src]
pub fn try_from(
big: Seconds<T>
) -> Result<Microseconds<T>, <Microseconds<T> as TryFrom<Seconds<T>>>::Error>
[src]type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
pub fn try_from(
big: Seconds<u64>
) -> Result<Microseconds<u32>, <Microseconds<u32> as TryFrom<Seconds<u64>>>::Error>
[src]
pub fn try_from(
big: Seconds<u64>
) -> Result<Microseconds<u32>, <Microseconds<u32> as TryFrom<Seconds<u64>>>::Error>
[src]type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Auto Trait Implementations
impl<T> Send for Microseconds<T> where
T: Send,
impl<T> Sync for Microseconds<T> where
T: Sync,
impl<T> Unpin for Microseconds<T> where
T: Unpin,