Struct lpc55_hal::time::Hertz[][src]

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

Hertz

Implementations

impl<T> Hertz<T> where
    T: TimeInt, 
[src]

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

Trait Implementations

impl<T, Rhs> Add<Rhs> for Hertz<T> where
    T: TimeInt,
    Rhs: Rate + FixedPoint,
    Hertz<T>: TryFrom<Rhs>, 
[src]

type Output = Hertz<T>

The resulting type after applying the + operator.

pub fn add(self, rhs: Rhs) -> <Hertz<T> as Add<Rhs>>::Output[src]

See Add/Sub

impl<T> Clone for Hertz<T> where
    T: Clone + TimeInt, 
[src]

impl<T> Copy for Hertz<T> where
    T: Copy + TimeInt, 
[src]

impl<T> Debug for Hertz<T> where
    T: Debug + TimeInt, 
[src]

impl<T> Default for Hertz<T> where
    T: Default + TimeInt, 
[src]

impl<T> Display for Hertz<T> where
    T: TimeInt, 
[src]

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

impl<T> Div<T> for Hertz<T> where
    T: TimeInt, 
[src]

type Output = Hertz<T>

The resulting type after applying the / operator.

pub fn div(self, rhs: T) -> <Hertz<T> as Div<T>>::Output[src]

See Mul/Div

impl<T> Eq for Hertz<T> where
    T: Eq + TimeInt, 
[src]

impl<T> FixedPoint for Hertz<T> where
    T: TimeInt, 
[src]

type T = T

The integer (magnitude) type

pub fn new(value: <Hertz<T> as FixedPoint>::T) -> Hertz<T>[src]

pub fn integer(&self) -> &<Hertz<T> as FixedPoint>::T[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 From<Hertz<u32>> for Kilohertz<u64>[src]

pub fn from(small: Hertz<u32>) -> Kilohertz<u64>[src]

impl From<Hertz<u32>> for Megahertz<u64>[src]

pub fn from(small: Hertz<u32>) -> Megahertz<u64>[src]

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

pub fn from(source: Hertz<u32>) -> Hertz<u64>[src]

impl From<Kibihertz<u32>> for Hertz<u64>[src]

pub fn from(big: Kibihertz<u32>) -> Hertz<u64>[src]

impl From<Kilohertz<u32>> for Hertz<u64>[src]

pub fn from(big: Kilohertz<u32>) -> Hertz<u64>[src]

impl From<Mebihertz<u32>> for Hertz<u64>[src]

pub fn from(big: Mebihertz<u32>) -> Hertz<u64>[src]

impl From<Megahertz<u32>> for Hertz<u64>[src]

pub fn from(big: Megahertz<u32>) -> Hertz<u64>[src]

impl<T> Hash for Hertz<T> where
    T: Hash + TimeInt, 
[src]

impl<T> Mul<T> for Hertz<T> where
    T: TimeInt, 
[src]

type Output = Hertz<T>

The resulting type after applying the * operator.

pub fn mul(self, rhs: T) -> <Hertz<T> as Mul<T>>::Output[src]

See Mul/Div

impl<T> Ord for Hertz<T> where
    T: Ord + TimeInt, 
[src]

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

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

impl<T, RhsInt> PartialEq<Hertz<RhsInt>> for Kilohertz<T> where
    T: TimeInt,
    RhsInt: TimeInt,
    Hertz<RhsInt>: PartialEq<Kilohertz<T>>, 
[src]

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

impl<T, RhsInt> PartialEq<Hertz<RhsInt>> for Megahertz<T> where
    T: TimeInt,
    RhsInt: TimeInt,
    Hertz<RhsInt>: PartialEq<Megahertz<T>>, 
[src]

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

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

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

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

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

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

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

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

pub fn eq(&self, rhs: &Megahertz<RhsInt>) -> bool[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]

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]

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]

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]

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]

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]

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]

impl<T> Rate for Hertz<T> where
    T: TimeInt, 
[src]

impl<T, Rhs> Rem<Rhs> for Hertz<T> where
    T: TimeInt,
    Rhs: Rate + FixedPoint,
    Hertz<T>: TryFrom<Rhs>, 
[src]

type Output = Hertz<T>

The resulting type after applying the % operator.

pub fn rem(self, rhs: Rhs) -> <Hertz<T> as Rem<Rhs>>::Output[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]

type Output = Hertz<T>

The resulting type after applying the - operator.

pub fn sub(self, rhs: Rhs) -> <Hertz<T> as Sub<Rhs>>::Output[src]

See Add/Sub

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

type Error = ConversionError

The type returned in the event of a conversion error.

pub fn try_from(
    generic_rate: Generic<SourceInt>
) -> Result<Hertz<DestInt>, <Hertz<DestInt> as TryFrom<Generic<SourceInt>>>::Error>
[src]

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

type Error = ConversionError

The type returned in the event of a conversion error.

pub fn try_from(
    source: Hertz<u64>
) -> Result<Hertz<u32>, <Hertz<u32> as TryFrom<Hertz<u64>>>::Error>
[src]

impl TryFrom<Hertz<u64>> for Kilohertz<u32>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

pub fn try_from(
    small: Hertz<u64>
) -> Result<Kilohertz<u32>, <Kilohertz<u32> as TryFrom<Hertz<u64>>>::Error>
[src]

impl TryFrom<Hertz<u64>> for Megahertz<u32>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

pub fn try_from(
    small: Hertz<u64>
) -> Result<Megahertz<u32>, <Megahertz<u32> as TryFrom<Hertz<u64>>>::Error>
[src]

impl<T> TryFrom<Kibihertz<T>> for Hertz<T> where
    T: TimeInt, 
[src]

type Error = ConversionError

The type returned in the event of a conversion error.

pub fn try_from(
    big: Kibihertz<T>
) -> Result<Hertz<T>, <Hertz<T> as TryFrom<Kibihertz<T>>>::Error>
[src]

impl TryFrom<Kibihertz<u64>> for Hertz<u32>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

pub fn try_from(
    big: Kibihertz<u64>
) -> Result<Hertz<u32>, <Hertz<u32> as TryFrom<Kibihertz<u64>>>::Error>
[src]

impl<T> TryFrom<Kilohertz<T>> for Hertz<T> where
    T: TimeInt, 
[src]

type Error = ConversionError

The type returned in the event of a conversion error.

pub fn try_from(
    big: Kilohertz<T>
) -> Result<Hertz<T>, <Hertz<T> as TryFrom<Kilohertz<T>>>::Error>
[src]

impl TryFrom<Kilohertz<u64>> for Hertz<u32>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

pub fn try_from(
    big: Kilohertz<u64>
) -> Result<Hertz<u32>, <Hertz<u32> as TryFrom<Kilohertz<u64>>>::Error>
[src]

impl<T> TryFrom<Mebihertz<T>> for Hertz<T> where
    T: TimeInt, 
[src]

type Error = ConversionError

The type returned in the event of a conversion error.

pub fn try_from(
    big: Mebihertz<T>
) -> Result<Hertz<T>, <Hertz<T> as TryFrom<Mebihertz<T>>>::Error>
[src]

impl TryFrom<Mebihertz<u64>> for Hertz<u32>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

pub fn try_from(
    big: Mebihertz<u64>
) -> Result<Hertz<u32>, <Hertz<u32> as TryFrom<Mebihertz<u64>>>::Error>
[src]

impl<T> TryFrom<Megahertz<T>> for Hertz<T> where
    T: TimeInt, 
[src]

type Error = ConversionError

The type returned in the event of a conversion error.

pub fn try_from(
    big: Megahertz<T>
) -> Result<Hertz<T>, <Hertz<T> as TryFrom<Megahertz<T>>>::Error>
[src]

impl TryFrom<Megahertz<u64>> for Hertz<u32>[src]

type Error = ConversionError

The type returned in the event of a conversion error.

pub fn try_from(
    big: Megahertz<u64>
) -> Result<Hertz<u32>, <Hertz<u32> as TryFrom<Megahertz<u64>>>::Error>
[src]

Auto Trait Implementations

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

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

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

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> Same<T> for T

type Output = T

Should always be Self

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.