[][src]Trait bl602_hal::prelude::Extensions

pub trait Extensions: TimeInt {
    fn MiHz(self) -> Mebihertz<Self> { ... }
fn MHz(self) -> Megahertz<Self> { ... }
fn KiHz(self) -> Kibihertz<Self> { ... }
fn kHz(self) -> Kilohertz<Self> { ... }
fn Hz(self) -> Hertz<Self> { ... }
fn MiBps(self) -> MebibytesPerSecond<Self> { ... }
fn MBps(self) -> MegabytesPerSecond<Self> { ... }
fn KiBps(self) -> KibibytesPerSecond<Self> { ... }
fn kBps(self) -> KilobytesPerSecond<Self> { ... }
fn Bps(self) -> BytesPerSecond<Self> { ... }
fn Mibps(self) -> MebibitsPerSecond<Self> { ... }
fn Mbps(self) -> MegabitsPerSecond<Self> { ... }
fn Kibps(self) -> KibibitsPerSecond<Self> { ... }
fn kbps(self) -> KilobitsPerSecond<Self> { ... }
fn bps(self) -> BitsPerSecond<Self> { ... }
fn MiBd(self) -> Mebibaud<Self> { ... }
fn MBd(self) -> Megabaud<Self> { ... }
fn KiBd(self) -> Kibibaud<Self> { ... }
fn kBd(self) -> Kilobaud<Self> { ... }
fn Bd(self) -> Baud<Self> { ... } }

Create rate-based extensions from primitive numeric types.

assert_eq!(5_u32.MiHz(), Mebihertz(5_u32));
assert_eq!(5_u32.MHz(), Megahertz(5_u32));
assert_eq!(5_u32.KiHz(), Kibihertz(5_u32));
assert_eq!(5_u32.kHz(), Kilohertz(5_u32));
assert_eq!(5_u32.Hz(), Hertz(5_u32));
assert_eq!(5_u32.MiBps(), MebibytesPerSecond(5_u32));
assert_eq!(5_u32.MBps(), MegabytesPerSecond(5_u32));
assert_eq!(5_u32.KiBps(), KibibytesPerSecond(5_u32));
assert_eq!(5_u32.kBps(), KilobytesPerSecond(5_u32));
assert_eq!(5_u32.Bps(), BytesPerSecond(5_u32));
assert_eq!(5_u32.Mibps(), MebibitsPerSecond(5_u32));
assert_eq!(5_u32.Mbps(), MegabitsPerSecond(5_u32));
assert_eq!(5_u32.Kibps(), KibibitsPerSecond(5_u32));
assert_eq!(5_u32.kbps(), KilobitsPerSecond(5_u32));
assert_eq!(5_u32.bps(), BitsPerSecond(5_u32));
assert_eq!(5_u32.MiBd(), Mebibaud(5_u32));
assert_eq!(5_u32.MBd(), Megabaud(5_u32));
assert_eq!(5_u32.KiBd(), Kibibaud(5_u32));
assert_eq!(5_u32.kBd(), Kilobaud(5_u32));
assert_eq!(5_u32.Bd(), Baud(5_u32));

Provided methods

fn MiHz(self) -> Mebihertz<Self>

mebihertz

fn MHz(self) -> Megahertz<Self>

megahertz

fn KiHz(self) -> Kibihertz<Self>

kibihertz

fn kHz(self) -> Kilohertz<Self>

kilohertz

fn Hz(self) -> Hertz<Self>

hertz

fn MiBps(self) -> MebibytesPerSecond<Self>

mebibytes per second

fn MBps(self) -> MegabytesPerSecond<Self>

megabytes per second

fn KiBps(self) -> KibibytesPerSecond<Self>

kibibytes per second

fn kBps(self) -> KilobytesPerSecond<Self>

kiloBytes per second

fn Bps(self) -> BytesPerSecond<Self>

bytes per second

fn Mibps(self) -> MebibitsPerSecond<Self>

mebibits per second

fn Mbps(self) -> MegabitsPerSecond<Self>

megabits per second

fn Kibps(self) -> KibibitsPerSecond<Self>

kibibits per second

fn kbps(self) -> KilobitsPerSecond<Self>

kilobits per second

fn bps(self) -> BitsPerSecond<Self>

bits per second

fn MiBd(self) -> Mebibaud<Self>

mebibaud

fn MBd(self) -> Megabaud<Self>

megabaud

fn KiBd(self) -> Kibibaud<Self>

kibibaud

fn kBd(self) -> Kilobaud<Self>

kilobaud

fn Bd(self) -> Baud<Self>

baud

Loading content...

Implementors

impl Extensions for u32[src]

impl Extensions for u64[src]

Loading content...