fugit

Trait RateExtU32

Source
pub trait RateExtU32 {
    // Required methods
    fn Hz<const NOM: u32, const DENOM: u32>(self) -> Rate<u32, NOM, DENOM>;
    fn kHz<const NOM: u32, const DENOM: u32>(self) -> Rate<u32, NOM, DENOM>;
    fn MHz<const NOM: u32, const DENOM: u32>(self) -> Rate<u32, NOM, DENOM>;
}
Expand description

Extension trait for simple short-hands for u32 Rate

Required Methods§

Source

fn Hz<const NOM: u32, const DENOM: u32>(self) -> Rate<u32, NOM, DENOM>

Shorthand for creating a rate which represents hertz.

Source

fn kHz<const NOM: u32, const DENOM: u32>(self) -> Rate<u32, NOM, DENOM>

Shorthand for creating a rate which represents kilohertz.

Source

fn MHz<const NOM: u32, const DENOM: u32>(self) -> Rate<u32, NOM, DENOM>

Shorthand for creating a rate which represents megahertz.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ExtU32 for u32

Source§

fn Hz<const NOM: u32, const DENOM: u32>(self) -> Rate<u32, NOM, DENOM>

Source§

fn kHz<const NOM: u32, const DENOM: u32>(self) -> Rate<u32, NOM, DENOM>

Source§

fn MHz<const NOM: u32, const DENOM: u32>(self) -> Rate<u32, NOM, DENOM>

Implementors§