Skip to main content

TimeProvider

Trait TimeProvider 

Source
pub trait TimeProvider: Send + Sync {
    // Required method
    fn now(&self) -> Instant;
}
Expand description

Source of the current time used by a DefaultCache when applying TTLs.

Required Methods§

Source

fn now(&self) -> Instant

Return the current instant.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§