Skip to main content

Time

Trait Time 

Source
pub trait Time: Copy {
    type Proof<'d>;

    const FIXED: bool;

    // Required methods
    fn proof<'d>(self, driver: Reference<'d>) -> Self::Proof<'d>;
    fn park(self) -> Instant;
    fn limit(self, timeout: Option<Duration>) -> Option<Duration>;

    // Provided methods
    fn start(self) -> Sample { ... }
    fn tick(self) -> Result<Sample, Error> { ... }
    fn quiesce(self) -> Result<Sample, Error> { ... }
    fn timeout(self, deadline: Deadline<'_>) -> Duration { ... }
}

Required Associated Constants§

Required Associated Types§

Source

type Proof<'d>

Required Methods§

Source

fn proof<'d>(self, driver: Reference<'d>) -> Self::Proof<'d>

Source

fn park(self) -> Instant

Source

fn limit(self, timeout: Option<Duration>) -> Option<Duration>

Provided Methods§

Source

fn start(self) -> Sample

Source

fn tick(self) -> Result<Sample, Error>

Source

fn quiesce(self) -> Result<Sample, Error>

Source

fn timeout(self, deadline: Deadline<'_>) -> Duration

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl Time for Fixed<'_>

Source§

const FIXED: bool = true

Source§

type Proof<'d> = Moment<'d>

Source§

impl Time for Wall

Source§

const FIXED: bool = false

Source§

type Proof<'d> = ()

Source§

impl<S, L> Time for Bound<S, L>
where S: Source, L: Limit,

Source§

const FIXED: bool = S::FIXED

Source§

type Proof<'d> = <S as Time>::Proof<'d>