Skip to main content

SessionLoader

Trait SessionLoader 

Source
pub trait SessionLoader: Send + Sync {
    // Required method
    fn load_session(
        &self,
        id: SessionId,
    ) -> BoxFuture<'_, Result<LoadedSession, BoxError>>;
}
Expand description

Abstraction for restoring a session from persistent storage.

Concrete implementations typically come from defect-storage.

Required Methods§

Source

fn load_session( &self, id: SessionId, ) -> BoxFuture<'_, Result<LoadedSession, BoxError>>

Read back the state needed for recovery by session id.

§Errors

The session does not exist, the storage is corrupted, or replay fails.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§