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§
sourcefn nanos<const NOM: u32, const DENOM: u32>(self) -> Duration<u64, NOM, DENOM>
fn nanos<const NOM: u32, const DENOM: u32>(self) -> Duration<u64, NOM, DENOM>
Shorthand for creating a duration which represents nanoseconds.
sourcefn micros<const NOM: u32, const DENOM: u32>(self) -> Duration<u64, NOM, DENOM>
fn micros<const NOM: u32, const DENOM: u32>(self) -> Duration<u64, NOM, DENOM>
Shorthand for creating a duration which represents microseconds.
sourcefn millis<const NOM: u32, const DENOM: u32>(self) -> Duration<u64, NOM, DENOM>
fn millis<const NOM: u32, const DENOM: u32>(self) -> Duration<u64, NOM, DENOM>
Shorthand for creating a duration which represents milliseconds.
sourcefn secs<const NOM: u32, const DENOM: u32>(self) -> Duration<u64, NOM, DENOM>
fn secs<const NOM: u32, const DENOM: u32>(self) -> Duration<u64, NOM, DENOM>
Shorthand for creating a duration which represents seconds.
Object Safety§
This trait is not object safe.