Trait TimeProvider
pub trait TimeProvider:
Debug
+ Send
+ Sync {
// Required method
fn current_time(&self) -> Option<UnixTime>;
}Available on crate feature
tls only.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§
fn 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.
Implementors§
impl TimeProvider for DefaultTimeProvider
Available on crate feature
std only.