Skip to main content

ClockProvider

Trait ClockProvider 

Source
pub trait ClockProvider:
    Debug
    + Send
    + Sync {
    // Required methods
    fn timezone(&self) -> &TimeZoneSpec;
    fn now(&self) -> NaiveDateTime;

    // Provided method
    fn today(&self) -> NaiveDate { ... }
}
Expand description

Injectable clock provider for volatile date/time builtins.

Required Methods§

Provided Methods§

Source

fn today(&self) -> NaiveDate

Implementors§