Skip to main content

SessionStore

Trait SessionStore 

Source
pub trait SessionStore:
    Debug
    + Send
    + Sync {
    // Required methods
    fn load(
        &self,
        session_id: SessionId,
    ) -> SessionStoreFuture<'_, SessionSnapshot>;
    fn append(
        &self,
        transaction: AppendTransaction,
    ) -> SessionStoreFuture<'_, AppendOutcome>;
    fn active_grants_for_actor(
        &self,
        actor_id: ActorId,
    ) -> SessionStoreFuture<'_, Vec<PolicyGrant>>;
}
Expand description

Replaceable append-only session repository contract.

Required Methods§

Source

fn load(&self, session_id: SessionId) -> SessionStoreFuture<'_, SessionSnapshot>

Loads one immutable session snapshot.

Source

fn append( &self, transaction: AppendTransaction, ) -> SessionStoreFuture<'_, AppendOutcome>

Atomically validates and appends one transaction.

Source

fn active_grants_for_actor( &self, actor_id: ActorId, ) -> SessionStoreFuture<'_, Vec<PolicyGrant>>

Returns non-revoked grant candidates issued to one actor across sessions.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§