Expirable

Trait Expirable 

Source
pub trait Expirable {
    // Required method
    fn expires_at_ms_opt(&self) -> Option<u64>;

    // Provided method
    fn expires_at_ms(&self) -> u64 { ... }
}
Expand description

A trait for evaluating and returning the absolute expiration time.

Required Methods§

Source

fn expires_at_ms_opt(&self) -> Option<u64>

Returns the optional expiration time in milliseconds since the Unix epoch (January 1, 1970).

Provided Methods§

Source

fn expires_at_ms(&self) -> u64

Evaluates and returns the absolute expiration time in milliseconds since the Unix epoch (January 1, 1970).

If there is no expiration time, it returns u64::MAX.

Implementations on Foreign Types§

Source§

impl<T> Expirable for Option<T>
where T: Expirable,

Source§

impl<T> Expirable for &T
where T: Expirable,

Implementors§