Struct lpc55_hal::time::Hertz [−][src]
pub struct Hertz<T = u32>(pub T)
where
T: TimeInt;
Hertz
Implementations
Trait Implementations
impl<T, Rhs> Add<Rhs> for Hertz<T> where
T: TimeInt,
Rhs: Rate + FixedPoint,
Hertz<T>: TryFrom<Rhs>,
[src]
impl<T, Rhs> Add<Rhs> for Hertz<T> where
T: TimeInt,
Rhs: Rate + FixedPoint,
Hertz<T>: TryFrom<Rhs>,
[src]impl<T> Clone for Hertz<T> where
T: Clone + TimeInt,
[src]
impl<T> Clone for Hertz<T> where
T: Clone + TimeInt,
[src]pub fn clone(&self) -> Hertz<T>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T> FixedPoint for Hertz<T> where
T: TimeInt,
[src]
impl<T> FixedPoint for Hertz<T> where
T: TimeInt,
[src]type T = T
The integer (magnitude) type
pub const SCALING_FACTOR: Fraction
[src]
pub fn new(value: <Hertz<T> as FixedPoint>::T) -> Hertz<T>
[src]
pub fn integer(&self) -> &<Hertz<T> as FixedPoint>::T
[src]
pub fn checked_mul(&self, rhs: &Self::T) -> Option<Self>
[src]
pub fn checked_div(&self, rhs: &Self::T) -> Option<Self>
[src]
pub fn min_value() -> Self::T
[src]
pub fn max_value() -> Self::T
[src]
impl<T> From<Hertz<T>> for Kilohertz<T> where
T: TimeInt,
[src]
impl<T> From<Hertz<T>> for Kilohertz<T> where
T: TimeInt,
[src]impl<T> From<Hertz<T>> for Megahertz<T> where
T: TimeInt,
[src]
impl<T> From<Hertz<T>> for Megahertz<T> where
T: TimeInt,
[src]impl<T, RhsInt> PartialEq<Hertz<RhsInt>> for Hertz<T> where
T: TimeInt + TryFrom<RhsInt>,
RhsInt: TimeInt,
[src]
impl<T, RhsInt> PartialEq<Hertz<RhsInt>> for Hertz<T> where
T: TimeInt + TryFrom<RhsInt>,
RhsInt: TimeInt,
[src]impl<T, RhsInt> PartialEq<Hertz<RhsInt>> for Kilohertz<T> where
T: TimeInt,
RhsInt: TimeInt,
Hertz<RhsInt>: PartialEq<Kilohertz<T>>,
[src]
impl<T, RhsInt> PartialEq<Hertz<RhsInt>> for Kilohertz<T> where
T: TimeInt,
RhsInt: TimeInt,
Hertz<RhsInt>: PartialEq<Kilohertz<T>>,
[src]impl<T, RhsInt> PartialEq<Hertz<RhsInt>> for Megahertz<T> where
T: TimeInt,
RhsInt: TimeInt,
Hertz<RhsInt>: PartialEq<Megahertz<T>>,
[src]
impl<T, RhsInt> PartialEq<Hertz<RhsInt>> for Megahertz<T> where
T: TimeInt,
RhsInt: TimeInt,
Hertz<RhsInt>: PartialEq<Megahertz<T>>,
[src]impl<T, RhsInt> PartialEq<Kibihertz<RhsInt>> for Hertz<T> where
T: TimeInt,
RhsInt: TimeInt,
Hertz<T>: TryFrom<Kibihertz<RhsInt>>,
[src]
impl<T, RhsInt> PartialEq<Kibihertz<RhsInt>> for Hertz<T> where
T: TimeInt,
RhsInt: TimeInt,
Hertz<T>: TryFrom<Kibihertz<RhsInt>>,
[src]impl<T, RhsInt> PartialEq<Kilohertz<RhsInt>> for Hertz<T> where
T: TimeInt,
RhsInt: TimeInt,
Hertz<T>: TryFrom<Kilohertz<RhsInt>>,
[src]
impl<T, RhsInt> PartialEq<Kilohertz<RhsInt>> for Hertz<T> where
T: TimeInt,
RhsInt: TimeInt,
Hertz<T>: TryFrom<Kilohertz<RhsInt>>,
[src]impl<T, RhsInt> PartialEq<Mebihertz<RhsInt>> for Hertz<T> where
T: TimeInt,
RhsInt: TimeInt,
Hertz<T>: TryFrom<Mebihertz<RhsInt>>,
[src]
impl<T, RhsInt> PartialEq<Mebihertz<RhsInt>> for Hertz<T> where
T: TimeInt,
RhsInt: TimeInt,
Hertz<T>: TryFrom<Mebihertz<RhsInt>>,
[src]impl<T, RhsInt> PartialEq<Megahertz<RhsInt>> for Hertz<T> where
T: TimeInt,
RhsInt: TimeInt,
Hertz<T>: TryFrom<Megahertz<RhsInt>>,
[src]
impl<T, RhsInt> PartialEq<Megahertz<RhsInt>> for Hertz<T> where
T: TimeInt,
RhsInt: TimeInt,
Hertz<T>: TryFrom<Megahertz<RhsInt>>,
[src]impl<T, RhsInt> PartialOrd<Hertz<RhsInt>> for Hertz<T> where
T: TimeInt + TryFrom<RhsInt>,
RhsInt: TimeInt,
[src]
impl<T, RhsInt> PartialOrd<Hertz<RhsInt>> for Hertz<T> where
T: TimeInt + TryFrom<RhsInt>,
RhsInt: TimeInt,
[src]pub fn partial_cmp(&self, rhs: &Hertz<RhsInt>) -> Option<Ordering>
[src]
See Comparisons
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn lt(&self, other: &Rhs) -> bool#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn le(&self, other: &Rhs) -> bool#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn gt(&self, other: &Rhs) -> bool#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn ge(&self, other: &Rhs) -> boolimpl<T, RhsInt> PartialOrd<Hertz<RhsInt>> for Kilohertz<T> where
T: TimeInt,
RhsInt: TimeInt,
Hertz<RhsInt>: TryFrom<Kilohertz<T>>,
Hertz<RhsInt>: Ord,
[src]
impl<T, RhsInt> PartialOrd<Hertz<RhsInt>> for Kilohertz<T> where
T: TimeInt,
RhsInt: TimeInt,
Hertz<RhsInt>: TryFrom<Kilohertz<T>>,
Hertz<RhsInt>: Ord,
[src]pub fn partial_cmp(&self, rhs: &Hertz<RhsInt>) -> Option<Ordering>
[src]
See Comparisons
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn lt(&self, other: &Rhs) -> bool#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn le(&self, other: &Rhs) -> bool#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn gt(&self, other: &Rhs) -> bool#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn ge(&self, other: &Rhs) -> boolimpl<T, RhsInt> PartialOrd<Hertz<RhsInt>> for Megahertz<T> where
T: TimeInt,
RhsInt: TimeInt,
Hertz<RhsInt>: TryFrom<Megahertz<T>>,
Hertz<RhsInt>: Ord,
[src]
impl<T, RhsInt> PartialOrd<Hertz<RhsInt>> for Megahertz<T> where
T: TimeInt,
RhsInt: TimeInt,
Hertz<RhsInt>: TryFrom<Megahertz<T>>,
Hertz<RhsInt>: Ord,
[src]pub fn partial_cmp(&self, rhs: &Hertz<RhsInt>) -> Option<Ordering>
[src]
See Comparisons
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn lt(&self, other: &Rhs) -> bool#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn le(&self, other: &Rhs) -> bool#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn gt(&self, other: &Rhs) -> bool#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn ge(&self, other: &Rhs) -> boolimpl<T, RhsInt> PartialOrd<Kibihertz<RhsInt>> for Hertz<T> where
T: TimeInt,
RhsInt: TimeInt,
Hertz<T>: TryFrom<Kibihertz<RhsInt>>,
[src]
impl<T, RhsInt> PartialOrd<Kibihertz<RhsInt>> for Hertz<T> where
T: TimeInt,
RhsInt: TimeInt,
Hertz<T>: TryFrom<Kibihertz<RhsInt>>,
[src]pub fn partial_cmp(&self, rhs: &Kibihertz<RhsInt>) -> Option<Ordering>
[src]
See Comparisons
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn lt(&self, other: &Rhs) -> bool#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn le(&self, other: &Rhs) -> bool#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn gt(&self, other: &Rhs) -> bool#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn ge(&self, other: &Rhs) -> boolimpl<T, RhsInt> PartialOrd<Kilohertz<RhsInt>> for Hertz<T> where
T: TimeInt,
RhsInt: TimeInt,
Hertz<T>: TryFrom<Kilohertz<RhsInt>>,
[src]
impl<T, RhsInt> PartialOrd<Kilohertz<RhsInt>> for Hertz<T> where
T: TimeInt,
RhsInt: TimeInt,
Hertz<T>: TryFrom<Kilohertz<RhsInt>>,
[src]pub fn partial_cmp(&self, rhs: &Kilohertz<RhsInt>) -> Option<Ordering>
[src]
See Comparisons
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn lt(&self, other: &Rhs) -> bool#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn le(&self, other: &Rhs) -> bool#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn gt(&self, other: &Rhs) -> bool#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn ge(&self, other: &Rhs) -> boolimpl<T, RhsInt> PartialOrd<Mebihertz<RhsInt>> for Hertz<T> where
T: TimeInt,
RhsInt: TimeInt,
Hertz<T>: TryFrom<Mebihertz<RhsInt>>,
[src]
impl<T, RhsInt> PartialOrd<Mebihertz<RhsInt>> for Hertz<T> where
T: TimeInt,
RhsInt: TimeInt,
Hertz<T>: TryFrom<Mebihertz<RhsInt>>,
[src]pub fn partial_cmp(&self, rhs: &Mebihertz<RhsInt>) -> Option<Ordering>
[src]
See Comparisons
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn lt(&self, other: &Rhs) -> bool#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn le(&self, other: &Rhs) -> bool#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn gt(&self, other: &Rhs) -> bool#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn ge(&self, other: &Rhs) -> boolimpl<T, RhsInt> PartialOrd<Megahertz<RhsInt>> for Hertz<T> where
T: TimeInt,
RhsInt: TimeInt,
Hertz<T>: TryFrom<Megahertz<RhsInt>>,
[src]
impl<T, RhsInt> PartialOrd<Megahertz<RhsInt>> for Hertz<T> where
T: TimeInt,
RhsInt: TimeInt,
Hertz<T>: TryFrom<Megahertz<RhsInt>>,
[src]pub fn partial_cmp(&self, rhs: &Megahertz<RhsInt>) -> Option<Ordering>
[src]
See Comparisons
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn lt(&self, other: &Rhs) -> bool#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn le(&self, other: &Rhs) -> bool#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn gt(&self, other: &Rhs) -> bool#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn ge(&self, other: &Rhs) -> boolimpl<T> Rate for Hertz<T> where
T: TimeInt,
[src]
impl<T> Rate for Hertz<T> where
T: TimeInt,
[src]pub fn to_generic<DestInt>(
self,
scaling_factor: Fraction
) -> Result<Generic<DestInt>, ConversionError> where
Self: FixedPoint,
DestInt: TimeInt + TryFrom<Self::T>,
[src]
self,
scaling_factor: Fraction
) -> Result<Generic<DestInt>, ConversionError> where
Self: FixedPoint,
DestInt: TimeInt + TryFrom<Self::T>,
pub fn to_duration<Duration>(&self) -> Result<Duration, ConversionError> where
Self: FixedPoint,
Duration: Duration + FixedPoint,
<Duration as FixedPoint>::T: TryFrom<Self::T>,
[src]
Self: FixedPoint,
Duration: Duration + FixedPoint,
<Duration as FixedPoint>::T: TryFrom<Self::T>,
impl<T, Rhs> Rem<Rhs> for Hertz<T> where
T: TimeInt,
Rhs: Rate + FixedPoint,
Hertz<T>: TryFrom<Rhs>,
[src]
impl<T, Rhs> Rem<Rhs> for Hertz<T> where
T: TimeInt,
Rhs: Rate + FixedPoint,
Hertz<T>: TryFrom<Rhs>,
[src]impl<T> StructuralEq for Hertz<T> where
T: TimeInt,
[src]
impl<T> StructuralEq for Hertz<T> where
T: TimeInt,
[src]impl<T, Rhs> Sub<Rhs> for Hertz<T> where
T: TimeInt,
Rhs: Rate + FixedPoint,
Hertz<T>: TryFrom<Rhs>,
[src]
impl<T, Rhs> Sub<Rhs> for Hertz<T> where
T: TimeInt,
Rhs: Rate + FixedPoint,
Hertz<T>: TryFrom<Rhs>,
[src]impl<SourceInt, DestInt> TryFrom<Generic<SourceInt>> for Hertz<DestInt> where
DestInt: TimeInt + TryFrom<SourceInt>,
SourceInt: TimeInt,
[src]
impl<SourceInt, DestInt> TryFrom<Generic<SourceInt>> for Hertz<DestInt> where
DestInt: TimeInt + TryFrom<SourceInt>,
SourceInt: TimeInt,
[src]Auto Trait Implementations
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut 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, 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> Same<T> for T
impl<T> Same<T> for T
type Output = T
Should always be Self