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

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

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]

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

See Add/Sub

type Output = Self

The resulting type after applying the + operator.

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

fn clone(&self) -> Hertz<T>[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

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

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

Formats the value using the given formatter. Read more

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

fn default() -> Hertz<T>[src]

Returns the “default value” for a type. Read more

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

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

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

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

See Mul/Div

type Output = Self

The resulting type after applying the / operator.

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

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

type T = T

The integer (magnitude) type

const SCALING_FACTOR: Fraction[src]

The fractional scaling factor

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

fn checked_mul(&self, rhs: &Self::T) -> Option<Self>[src]

Multiply with overflow checking

fn checked_div(&self, rhs: &Self::T) -> Option<Self>[src]

Multiply with overflow checking

fn min_value() -> Self::T[src]

Returns the minimum integer value

fn max_value() -> Self::T[src]

Returns the maximum integer value

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

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

fn from(big: Decihertz<u32>) -> Self[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 Kibihertz<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 Kilohertz<T>[src]

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

fn from(big: Kibihertz<u32>) -> Self[src]

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

fn from(big: Kilohertz<u32>) -> Self[src]

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

fn from(big: Mebihertz<u32>) -> Self[src]

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

fn from(big: Megahertz<u32>) -> Self[src]

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

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

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

fn hash<__H: Hasher>(&self, state: &mut __H)[src]

Feeds this value into the given Hasher. Read more

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given Hasher. Read more

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

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

See Mul/Div

type Output = Self

The resulting type after applying the * operator.

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

fn cmp(&self, other: &Hertz<T>) -> Ordering[src]

This method returns an Ordering between self and other. Read more

#[must_use]
fn max(self, other: Self) -> Self
1.21.0[src]

Compares and returns the maximum of two values. Read more

#[must_use]
fn min(self, other: Self) -> Self
1.21.0[src]

Compares and returns the minimum of two values. Read more

#[must_use]
fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]

Restrict a value to a certain interval. Read more

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

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

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

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

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

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

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

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

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

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

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

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

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

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

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

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

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

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

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

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

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

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

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

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

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

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

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

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

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

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

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

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

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

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

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

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

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

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

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

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

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

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

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

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

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

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

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

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

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

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

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

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

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

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

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

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

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

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

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

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

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

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

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

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

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

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

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

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

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

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]

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

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

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

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

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

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

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

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

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

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

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

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

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

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

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

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

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

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

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

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

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

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

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

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

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

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

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

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

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

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

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

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

fn to_generic<DestInt: TimeInt>(
    self,
    scaling_factor: Fraction
) -> Result<Generic<DestInt>, ConversionError> where
    Self: FixedPoint,
    DestInt: TryFrom<Self::T>, 
[src]

Construct a Generic Rate from a named Rate (eg. Kilohertz) Read more

fn to_duration<Duration: Duration>(&self) -> Result<Duration, ConversionError> where
    Duration: FixedPoint,
    Self: FixedPoint,
    Duration::T: TryFrom<Self::T>, 
[src]

Convert to named Duration Read more

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

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

type Output = Self

The resulting type after applying the % operator.

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

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

See Add/Sub

type Output = Self

The resulting type after applying the - operator.

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

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

type Error = ConversionError

The type returned in the event of a conversion error.

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

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

type Error = ConversionError

The type returned in the event of a conversion error.

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

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

type Error = ConversionError

The type returned in the event of a conversion error.

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

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

type Error = ConversionError

The type returned in the event of a conversion error.

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

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

type Error = ConversionError

The type returned in the event of a conversion error.

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

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

type Error = ConversionError

The type returned in the event of a conversion error.

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

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

type Error = ConversionError

The type returned in the event of a conversion error.

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

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

type Error = ConversionError

The type returned in the event of a conversion error.

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

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

type Error = ConversionError

The type returned in the event of a conversion error.

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

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

type Error = ConversionError

The type returned in the event of a conversion error.

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

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

type Error = ConversionError

The type returned in the event of a conversion error.

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

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

type Error = ConversionError

The type returned in the event of a conversion error.

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

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

type Error = ConversionError

The type returned in the event of a conversion error.

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

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

type Error = ConversionError

The type returned in the event of a conversion error.

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

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

type Error = ConversionError

The type returned in the event of a conversion error.

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

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

type Error = ConversionError

The type returned in the event of a conversion error.

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

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

type Error = ConversionError

The type returned in the event of a conversion error.

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

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

type Error = ConversionError

The type returned in the event of a conversion error.

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

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

type Error = ConversionError

The type returned in the event of a conversion error.

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

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

type Error = ConversionError

The type returned in the event of a conversion error.

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

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

type Error = ConversionError

The type returned in the event of a conversion error.

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

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

type Error = ConversionError

The type returned in the event of a conversion error.

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

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

type Error = ConversionError

The type returned in the event of a conversion error.

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

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

type Error = ConversionError

The type returned in the event of a conversion error.

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

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

type Error = ConversionError

The type returned in the event of a conversion error.

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

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

type Error = ConversionError

The type returned in the event of a conversion error.

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

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

impl<T: TimeInt> StructuralEq 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]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

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]