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§
Sourcefn load(&self, session_id: SessionId) -> SessionStoreFuture<'_, SessionSnapshot>
fn load(&self, session_id: SessionId) -> SessionStoreFuture<'_, SessionSnapshot>
Loads one immutable session snapshot.
Sourcefn append(
&self,
transaction: AppendTransaction,
) -> SessionStoreFuture<'_, AppendOutcome>
fn append( &self, transaction: AppendTransaction, ) -> SessionStoreFuture<'_, AppendOutcome>
Atomically validates and appends one transaction.
Sourcefn active_grants_for_actor(
&self,
actor_id: ActorId,
) -> SessionStoreFuture<'_, Vec<PolicyGrant>>
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".