[][src]Struct embedded_time::rate::Hertz

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

Hertz

Implementations

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

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

Trait Implementations

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

type Output = Self

The resulting type after applying the + operator.

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

See Add/Sub

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

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

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

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

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

fn fmt(&self, f: &mut Formatter) -> Result[src]

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

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

type T = T

The integer (magnitude) type

fn new(value: Self::T) -> Self[src]

fn integer(&self) -> &Self::T[src]

impl<T: TimeInt> From<Hertz<T>> for Generic<T>[src]

impl<T: TimeInt> From<Hertz<T>> for Mebihertz<T>[src]

fn from(small: Hertz<T>) -> Self[src]

impl<T: TimeInt> From<Hertz<T>> for Megahertz<T>[src]

fn from(small: Hertz<T>) -> Self[src]

impl<T: TimeInt> From<Hertz<T>> for Kibihertz<T>[src]

fn from(small: Hertz<T>) -> Self[src]

impl<T: TimeInt> From<Hertz<T>> for Kilohertz<T>[src]

fn from(small: Hertz<T>) -> Self[src]

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Kibihertz<RhsInt>> for Hertz<T> where
    T: Widen,
    <T as Widen>::Output: Mul<Fraction>,
    <<T as Widen>::Output as Mul<Fraction>>::Output: PartialEq + TryFrom<<<RhsInt as Widen>::Output as Mul<Fraction>>::Output>,
    RhsInt: Widen,
    <RhsInt as Widen>::Output: Mul<Fraction>, 
[src]

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

impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Kilohertz<RhsInt>> for Hertz<T> where
    T: Widen,
    <T as Widen>::Output: Mul<Fraction>,
    <<T as Widen>::Output as Mul<Fraction>>::Output: PartialEq + TryFrom<<<RhsInt as Widen>::Output as Mul<Fraction>>::Output>,
    RhsInt: Widen,
    <RhsInt as Widen>::Output: Mul<Fraction>, 
[src]

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

impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Mebihertz<RhsInt>> for Hertz<T> where
    T: Widen,
    <T as Widen>::Output: Mul<Fraction>,
    <<T as Widen>::Output as Mul<Fraction>>::Output: PartialEq + TryFrom<<<RhsInt as Widen>::Output as Mul<Fraction>>::Output>,
    RhsInt: Widen,
    <RhsInt as Widen>::Output: Mul<Fraction>, 
[src]

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

impl<T: TimeInt, RhsInt: TimeInt> PartialEq<Megahertz<RhsInt>> for Hertz<T> where
    T: Widen,
    <T as Widen>::Output: Mul<Fraction>,
    <<T as Widen>::Output as Mul<Fraction>>::Output: PartialEq + TryFrom<<<RhsInt as Widen>::Output as Mul<Fraction>>::Output>,
    RhsInt: Widen,
    <RhsInt as Widen>::Output: Mul<Fraction>, 
[src]

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

impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Hertz<RhsInt>> for Mebihertz<T> where
    T: Widen,
    <T as Widen>::Output: Mul<Fraction>,
    <<T as Widen>::Output as Mul<Fraction>>::Output: Ord + TryFrom<<<RhsInt as Widen>::Output as Mul<Fraction>>::Output>,
    RhsInt: Widen,
    <RhsInt as Widen>::Output: Mul<Fraction> + TryFrom<<T as Widen>::Output> + TryFrom<<<T as Widen>::Output as Mul<Fraction>>::Output>,
    <<RhsInt as Widen>::Output as Mul<Fraction>>::Output: PartialEq + TryFrom<<<T as Widen>::Output as Mul<Fraction>>::Output>, 
[src]

fn partial_cmp(&self, rhs: &Hertz<RhsInt>) -> Option<Ordering>[src]

impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Hertz<RhsInt>> for Megahertz<T> where
    T: Widen,
    <T as Widen>::Output: Mul<Fraction>,
    <<T as Widen>::Output as Mul<Fraction>>::Output: Ord + TryFrom<<<RhsInt as Widen>::Output as Mul<Fraction>>::Output>,
    RhsInt: Widen,
    <RhsInt as Widen>::Output: Mul<Fraction> + TryFrom<<T as Widen>::Output> + TryFrom<<<T as Widen>::Output as Mul<Fraction>>::Output>,
    <<RhsInt as Widen>::Output as Mul<Fraction>>::Output: PartialEq + TryFrom<<<T as Widen>::Output as Mul<Fraction>>::Output>, 
[src]

fn partial_cmp(&self, rhs: &Hertz<RhsInt>) -> Option<Ordering>[src]

impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Hertz<RhsInt>> for Kibihertz<T> where
    T: Widen,
    <T as Widen>::Output: Mul<Fraction>,
    <<T as Widen>::Output as Mul<Fraction>>::Output: Ord + TryFrom<<<RhsInt as Widen>::Output as Mul<Fraction>>::Output>,
    RhsInt: Widen,
    <RhsInt as Widen>::Output: Mul<Fraction> + TryFrom<<T as Widen>::Output> + TryFrom<<<T as Widen>::Output as Mul<Fraction>>::Output>,
    <<RhsInt as Widen>::Output as Mul<Fraction>>::Output: PartialEq + TryFrom<<<T as Widen>::Output as Mul<Fraction>>::Output>, 
[src]

fn partial_cmp(&self, rhs: &Hertz<RhsInt>) -> Option<Ordering>[src]

impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Hertz<RhsInt>> for Kilohertz<T> where
    T: Widen,
    <T as Widen>::Output: Mul<Fraction>,
    <<T as Widen>::Output as Mul<Fraction>>::Output: Ord + TryFrom<<<RhsInt as Widen>::Output as Mul<Fraction>>::Output>,
    RhsInt: Widen,
    <RhsInt as Widen>::Output: Mul<Fraction> + TryFrom<<T as Widen>::Output> + TryFrom<<<T as Widen>::Output as Mul<Fraction>>::Output>,
    <<RhsInt as Widen>::Output as Mul<Fraction>>::Output: PartialEq + TryFrom<<<T as Widen>::Output as Mul<Fraction>>::Output>, 
[src]

fn partial_cmp(&self, rhs: &Hertz<RhsInt>) -> Option<Ordering>[src]

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

fn partial_cmp(&self, rhs: &Hertz<RhsInt>) -> Option<Ordering>[src]

impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Kibihertz<RhsInt>> for Hertz<T> where
    T: Widen,
    <T as Widen>::Output: Mul<Fraction>,
    <<T as Widen>::Output as Mul<Fraction>>::Output: Ord + PartialEq + TryFrom<<<RhsInt as Widen>::Output as Mul<Fraction>>::Output>,
    RhsInt: Widen,
    <RhsInt as Widen>::Output: Mul<Fraction>, 
[src]

fn partial_cmp(&self, rhs: &Kibihertz<RhsInt>) -> Option<Ordering>[src]

impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Kilohertz<RhsInt>> for Hertz<T> where
    T: Widen,
    <T as Widen>::Output: Mul<Fraction>,
    <<T as Widen>::Output as Mul<Fraction>>::Output: Ord + PartialEq + TryFrom<<<RhsInt as Widen>::Output as Mul<Fraction>>::Output>,
    RhsInt: Widen,
    <RhsInt as Widen>::Output: Mul<Fraction>, 
[src]

fn partial_cmp(&self, rhs: &Kilohertz<RhsInt>) -> Option<Ordering>[src]

impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Mebihertz<RhsInt>> for Hertz<T> where
    T: Widen,
    <T as Widen>::Output: Mul<Fraction>,
    <<T as Widen>::Output as Mul<Fraction>>::Output: Ord + PartialEq + TryFrom<<<RhsInt as Widen>::Output as Mul<Fraction>>::Output>,
    RhsInt: Widen,
    <RhsInt as Widen>::Output: Mul<Fraction>, 
[src]

fn partial_cmp(&self, rhs: &Mebihertz<RhsInt>) -> Option<Ordering>[src]

impl<T: TimeInt, RhsInt: TimeInt> PartialOrd<Megahertz<RhsInt>> for Hertz<T> where
    T: Widen,
    <T as Widen>::Output: Mul<Fraction>,
    <<T as Widen>::Output as Mul<Fraction>>::Output: Ord + PartialEq + TryFrom<<<RhsInt as Widen>::Output as Mul<Fraction>>::Output>,
    RhsInt: Widen,
    <RhsInt as Widen>::Output: Mul<Fraction>, 
[src]

fn partial_cmp(&self, rhs: &Megahertz<RhsInt>) -> Option<Ordering>[src]

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

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

type Output = Self

The resulting type after applying the % operator.

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

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

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

type Output = Self

The resulting type after applying the - operator.

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

See Add/Sub

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

type Error = ConversionError

The type returned in the event of a conversion error.

fn try_from(generic_rate: Generic<SourceInt>) -> Result<Self, Self::Error>[src]

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

type Error = ConversionError

The type returned in the event of a conversion error.

fn try_from(source: Hertz<u64>) -> Result<Self, Self::Error>[src]

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

type Error = ConversionError

The type returned in the event of a conversion error.

fn try_from(small: Hertz<u64>) -> Result<Self, Self::Error>[src]

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

type Error = ConversionError

The type returned in the event of a conversion error.

fn try_from(small: Hertz<u64>) -> Result<Self, Self::Error>[src]

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

type Error = ConversionError

The type returned in the event of a conversion error.

fn try_from(small: Hertz<u64>) -> Result<Self, Self::Error>[src]

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

type Error = ConversionError

The type returned in the event of a conversion error.

fn try_from(small: Hertz<u64>) -> Result<Self, Self::Error>[src]

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

type Error = ConversionError

The type returned in the event of a conversion error.

fn try_from(big: Kibihertz<T>) -> Result<Self, Self::Error>[src]

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

type Error = ConversionError

The type returned in the event of a conversion error.

fn try_from(big: Kibihertz<u64>) -> Result<Self, Self::Error>[src]

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

type Error = ConversionError

The type returned in the event of a conversion error.

fn try_from(big: Kilohertz<T>) -> Result<Self, Self::Error>[src]

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

type Error = ConversionError

The type returned in the event of a conversion error.

fn try_from(big: Kilohertz<u64>) -> Result<Self, Self::Error>[src]

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

type Error = ConversionError

The type returned in the event of a conversion error.

fn try_from(big: Mebihertz<T>) -> Result<Self, Self::Error>[src]

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

type Error = ConversionError

The type returned in the event of a conversion error.

fn try_from(big: Mebihertz<u64>) -> Result<Self, Self::Error>[src]

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

type Error = ConversionError

The type returned in the event of a conversion error.

fn try_from(big: Megahertz<T>) -> Result<Self, Self::Error>[src]

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

type Error = ConversionError

The type returned in the event of a conversion error.

fn try_from(big: Megahertz<u64>) -> Result<Self, Self::Error>[src]

Auto Trait Implementations

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

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

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

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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.