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§
Sourcefn nanos<const NOM: u32, const DENOM: u32>(self) -> Duration<u32, NOM, DENOM>
fn nanos<const NOM: u32, const DENOM: u32>(self) -> Duration<u32, NOM, DENOM>
Shorthand for creating a duration which represents nanoseconds.
Sourcefn micros<const NOM: u32, const DENOM: u32>(self) -> Duration<u32, NOM, DENOM>
fn micros<const NOM: u32, const DENOM: u32>(self) -> Duration<u32, NOM, DENOM>
Shorthand for creating a duration which represents microseconds.
Sourcefn millis<const NOM: u32, const DENOM: u32>(self) -> Duration<u32, NOM, DENOM>
fn millis<const NOM: u32, const DENOM: u32>(self) -> Duration<u32, NOM, DENOM>
Shorthand for creating a duration which represents milliseconds.
Sourcefn secs<const NOM: u32, const DENOM: u32>(self) -> Duration<u32, NOM, DENOM>
fn secs<const NOM: u32, const DENOM: u32>(self) -> Duration<u32, NOM, DENOM>
Shorthand for creating a duration which represents seconds.
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.