IntoTimerOptions

Trait IntoTimerOptions 

Source
pub trait IntoTimerOptions<'a>: Sized {
    // Required method
    fn into_timer_options(self) -> TimerOptions<'a>;

    // Provided methods
    fn steady_time(self) -> TimerOptions<'a> { ... }
    fn system_time(self) -> TimerOptions<'a> { ... }
    fn node_time(self) -> TimerOptions<'a> { ... }
    fn clock(self, clock: &'a Clock) -> TimerOptions<'a> { ... }
}
Expand description

Trait to implicitly convert a suitable object into TimerOptions.

Required Methods§

Source

fn into_timer_options(self) -> TimerOptions<'a>

Convert a suitable object into TimerOptions. This can be used on Duration or TimerOptions itself.

Provided Methods§

Source

fn steady_time(self) -> TimerOptions<'a>

Use std::time::Instant for the timer. This the default so you shouldn’t generally have to call this.

Source

fn system_time(self) -> TimerOptions<'a>

Use std::time::SystemTime for the timer

Source

fn node_time(self) -> TimerOptions<'a>

Use the node clock for the timer

Source

fn clock(self, clock: &'a Clock) -> TimerOptions<'a>

Use a specific clock for the timer

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.

Implementations on Foreign Types§

Source§

impl<'a> IntoTimerOptions<'a> for Duration

Implementors§