pub trait SessionStore: Send + Sync {
// Required methods
fn load<'a>(
&'a self,
target: SessionTarget,
workspace_root: &'a str,
) -> BoxFuture<'a, Result<Session, SessionStoreError>>;
fn save<'a>(
&'a self,
session: &'a Session,
) -> BoxFuture<'a, Result<(), SessionStoreError>>;
fn list<'a>(
&'a self,
workspace_root: Option<&'a str>,
limit: usize,
) -> BoxFuture<'a, Result<Vec<SessionSummary>, SessionStoreError>>;
}Expand description
Durable session port. Implementations must commit atomically and preserve the previous readable state when a write fails.
Required Methods§
fn load<'a>( &'a self, target: SessionTarget, workspace_root: &'a str, ) -> BoxFuture<'a, Result<Session, SessionStoreError>>
fn save<'a>( &'a self, session: &'a Session, ) -> BoxFuture<'a, Result<(), SessionStoreError>>
fn list<'a>( &'a self, workspace_root: Option<&'a str>, limit: usize, ) -> BoxFuture<'a, Result<Vec<SessionSummary>, SessionStoreError>>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".