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§
Sourcefn into_timer_options(self) -> TimerOptions<'a>
fn into_timer_options(self) -> TimerOptions<'a>
Convert a suitable object into TimerOptions. This can be used on
Duration or TimerOptions itself.
Provided Methods§
Sourcefn steady_time(self) -> TimerOptions<'a>
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.
Sourcefn system_time(self) -> TimerOptions<'a>
fn system_time(self) -> TimerOptions<'a>
Use std::time::SystemTime for the timer
Sourcefn node_time(self) -> TimerOptions<'a>
fn node_time(self) -> TimerOptions<'a>
Use the node clock for the timer
Sourcefn clock(self, clock: &'a Clock) -> TimerOptions<'a>
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.