Skip to main content

TimerRefFactory

Trait TimerRefFactory 

Source
pub trait TimerRefFactory {
    // Required method
    fn timer_ref(&self) -> TimerRef;

    // Provided method
    fn now(&self) -> Instant { ... }
}
Expand description

A factory trait to produce instances of TimerRef

Required Methods§

Source

fn timer_ref(&self) -> TimerRef

Returns the timer reference for associated with this factory

Provided Methods§

Source

fn now(&self) -> Instant

Returns the current time according to the underlying timer implementation.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§