TokenLeaseExt

Trait TokenLeaseExt 

Source
pub trait TokenLeaseExt<Lease, Error>: Send + Sync {
    // Required method
    fn lease(
        &self,
        context: TokenLeaseContext,
    ) -> TokenLeaseFuture<'_, Lease, Error>;
}
Expand description

Contract for cache providers that want to loan out access tokens while the broker governs refresh lifetimes.

Required Methods§

Source

fn lease( &self, context: TokenLeaseContext, ) -> TokenLeaseFuture<'_, Lease, Error>

Attempts to borrow a token for the provided context.

Implementors§