Struct timestamp_source::Delay

source ·
pub struct Delay<T: Timestamp, R: RelaxStrategy = Spin> { /* private fields */ }
Expand description

Object that can delay by some duration.

T - Timestamp that provides now.

R - RelaxStrategy that provides a strategy to handle an idle.

Implementations§

Creates a new Delay<T, R>.

Borrow the duration of this Delay<T, R>.

Borrow the mutable duration of this Delay<T, R>.

Execute delay.

Errors

This function will return an error if Timestamp::duration_since returns an error.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.