DurationExt

Trait DurationExt 

Source
pub trait DurationExt {
    const QUANTUM: Self;

    // Required methods
    fn from_quanta(quanta: Quanta) -> Self;
    fn into_quanta(self) -> Quanta;
}

Required Associated Constants§

Source

const QUANTUM: Self

The unit duration.

Durations are expressed in terms of this unit and so cannot express periods beyond this resolution.

Required Methods§

Source

fn from_quanta(quanta: Quanta) -> Self

Constructs a Duration from quanta.

Source

fn into_quanta(self) -> Quanta

Converts the duration into quanta.

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.

Implementors§