Skip to main content

SigningCredential

Trait SigningCredential 

Source
pub trait SigningCredential:
    Clone
    + Debug
    + Send
    + Sync
    + Unpin
    + 'static {
    // Required method
    fn is_valid(&self) -> bool;

    // Provided method
    fn is_valid_at(&self, _ts: Timestamp) -> bool { ... }
}
Expand description

A credential that can distinguish cache freshness from exact usability.

Both checks must reject credentials that lack fields required for authentication.

Required Methods§

Source

fn is_valid(&self) -> bool

Return whether a cached credential can be reused without refreshing it.

Implementations may include a proactive refresh window in this check.

Provided Methods§

Source

fn is_valid_at(&self, _ts: Timestamp) -> bool

Return whether the credential is usable at this exact timestamp.

Implementations with an expiration time should not add a refresh or operation-specific buffer here. The default preserves the behavior of implementations that only provide SigningCredential::is_valid.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T: SigningCredential> SigningCredential for Option<T>

Implementors§