rtic_monotonics::rp2040::prelude

Trait ExtU64

Source
pub trait ExtU64 {
    // Required methods
    fn nanos<const NOM: u32, const DENOM: u32>(
        self,
    ) -> Duration<u64, NOM, DENOM>;
    fn micros<const NOM: u32, const DENOM: u32>(
        self,
    ) -> Duration<u64, NOM, DENOM>;
    fn millis<const NOM: u32, const DENOM: u32>(
        self,
    ) -> Duration<u64, NOM, DENOM>;
    fn secs<const NOM: u32, const DENOM: u32>(self) -> Duration<u64, NOM, DENOM>;
    fn minutes<const NOM: u32, const DENOM: u32>(
        self,
    ) -> Duration<u64, NOM, DENOM>;
    fn hours<const NOM: u32, const DENOM: u32>(
        self,
    ) -> Duration<u64, NOM, DENOM>;
}
Expand description

Extension trait for simple short-hands for u64 Durations

Required Methods§

Source

fn nanos<const NOM: u32, const DENOM: u32>(self) -> Duration<u64, NOM, DENOM>

Shorthand for creating a duration which represents nanoseconds.

Source

fn micros<const NOM: u32, const DENOM: u32>(self) -> Duration<u64, NOM, DENOM>

Shorthand for creating a duration which represents microseconds.

Source

fn millis<const NOM: u32, const DENOM: u32>(self) -> Duration<u64, NOM, DENOM>

Shorthand for creating a duration which represents milliseconds.

Source

fn secs<const NOM: u32, const DENOM: u32>(self) -> Duration<u64, NOM, DENOM>

Shorthand for creating a duration which represents seconds.

Source

fn minutes<const NOM: u32, const DENOM: u32>(self) -> Duration<u64, NOM, DENOM>

Shorthand for creating a duration which represents minutes.

Source

fn hours<const NOM: u32, const DENOM: u32>(self) -> Duration<u64, NOM, DENOM>

Shorthand for creating a duration which represents hours.

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 ExtU64 for u64

Source§

fn nanos<const NOM: u32, const DENOM: u32>(self) -> Duration<u64, NOM, DENOM>

Source§

fn micros<const NOM: u32, const DENOM: u32>(self) -> Duration<u64, NOM, DENOM>

Source§

fn millis<const NOM: u32, const DENOM: u32>(self) -> Duration<u64, NOM, DENOM>

Source§

fn secs<const NOM: u32, const DENOM: u32>(self) -> Duration<u64, NOM, DENOM>

Source§

fn minutes<const NOM: u32, const DENOM: u32>(self) -> Duration<u64, NOM, DENOM>

Source§

fn hours<const NOM: u32, const DENOM: u32>(self) -> Duration<u64, NOM, DENOM>

Implementors§