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§
Sourcefn load_session(
&self,
id: SessionId,
) -> BoxFuture<'_, Result<LoadedSession, BoxError>>
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".