[−][src]Struct embedded_time::units::Hertz
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]
T: From<Rhs>,
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]
T: From<Rhs>,
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]
fn cmp(&self, other: &Hertz<T>) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<T: PartialEq + TimeInt> PartialEq<Hertz<T>> for Hertz<T>
[src]
impl<T: PartialOrd + TimeInt> PartialOrd<Hertz<T>> for Hertz<T>
[src]
fn partial_cmp(&self, other: &Hertz<T>) -> Option<Ordering>
[src]
fn lt(&self, other: &Hertz<T>) -> bool
[src]
fn le(&self, other: &Hertz<T>) -> bool
[src]
fn gt(&self, other: &Hertz<T>) -> bool
[src]
fn ge(&self, other: &Hertz<T>) -> bool
[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,
T: Send,
impl<T> Sync for Hertz<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Hertz<T> where
T: Unpin,
T: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,