Skip to main content

Clock

Trait Clock 

Source
pub trait Clock {
    // Required method
    fn now_unix_secs(&self) -> u64;
}
Expand description

Abstract monotonic wall-clock exposing Unix seconds.

Implementations MUST return a value consistent with the signed issued_at / expires_at fields on capabilities. The verdict path is fail-closed against clock errors: if now_unix_secs returns a value in the past of issued_at or past expires_at, the capability is rejected.

Required Methods§

Source

fn now_unix_secs(&self) -> u64

Current Unix timestamp in seconds.

Implementations on Foreign Types§

Source§

impl<T: Clock + ?Sized> Clock for &T

Implementors§