Trait rustls::time_provider::TimeProvider

source ·
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§

source

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§