[][src]Struct embedded_time::units::Hertz

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

A frequency unit type

Implementations

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

pub fn into_period(self) -> Period<T>[src]

assert_eq!(Hertz(1_000).into_period(), Period::new(1, 1_000));

pub fn from_period(period: Period<T>) -> Self[src]

assert_eq!(Hertz::from_period(Period::new(1, 1_000)), Hertz(1_000));

Trait Implementations

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

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

type Output = Self

The resulting type after applying the / operator.

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

assert_eq!(Hertz(300) / 3, Hertz(100));

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

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

type Output = Self

The resulting type after applying the * operator.

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

assert_eq!(Hertz(100) * 3, Hertz(300));

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

impl<T: PartialEq + TimeInt> PartialEq<Hertz<T>> for Hertz<T>[src]

impl<T: PartialOrd + TimeInt> PartialOrd<Hertz<T>> for Hertz<T>[src]

impl<T: TimeInt> StructuralEq for Hertz<T>[src]

impl<T: TimeInt> StructuralPartialEq for Hertz<T>[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, 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.