pub trait TimeProvider:
Debug
+ Send
+ Sync {
// Required method
fn current_time(&self) -> Option<UnixTime>;
}Expand description
An object that provides the current time.
This is used to, for example, check if a certificate has expired during certificate validation, or to check the age of a ticket.
Required Methods§
Sourcefn current_time(&self) -> Option<UnixTime>
fn current_time(&self) -> Option<UnixTime>
Returns the current wall time.
This is not required to be monotonic.
Return None if unable to retrieve the time.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".