Skip to main content

SessionResolver

Trait SessionResolver 

Source
pub trait SessionResolver:
    Send
    + Sync
    + 'static {
    // Required methods
    fn resolve<'a>(&'a self, token_hash: &'a str) -> ResolveFuture<'a>;
    fn evict(&self, token_hash: &str);
}
Expand description

What callers use: an already-cache-tiered resolve. Object-safe so state structs can hold Arc<dyn SessionResolver> without a type parameter.

Required Methods§

Source

fn resolve<'a>(&'a self, token_hash: &'a str) -> ResolveFuture<'a>

Source

fn evict(&self, token_hash: &str)

Drop any cached entry for this hash (sign-out / revoke on the local node).

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§