Trait rtic_monotonics::systick::prelude::ExtU32

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

Extension trait for simple short-hands for u32 Durations

Required Methods§

source

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

Shorthand for creating a duration which represents nanoseconds.

source

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

Shorthand for creating a duration which represents microseconds.

source

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

Shorthand for creating a duration which represents milliseconds.

source

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

Shorthand for creating a duration which represents seconds.

source

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

Shorthand for creating a duration which represents minutes.

source

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

Shorthand for creating a duration which represents hours.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl ExtU32 for u32

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

Implementors§