pub trait SessionArchiveStorage: Send + Sync {
// Required methods
fn store(&self, session_id: &str, data: &[u8]) -> Result<(), String>;
fn list(
&self,
limit: usize,
prefix: Option<&str>,
) -> Result<Vec<ArchivedSessionSummary>, String>;
fn retrieve(&self, session_id: &str) -> Result<Vec<u8>, String>;
fn is_available(&self) -> bool;
}Expand description
Storage backend interface for session archives.
Required Methods§
Sourcefn store(&self, session_id: &str, data: &[u8]) -> Result<(), String>
fn store(&self, session_id: &str, data: &[u8]) -> Result<(), String>
Stores a compressed archive for the given session.
Sourcefn list(
&self,
limit: usize,
prefix: Option<&str>,
) -> Result<Vec<ArchivedSessionSummary>, String>
fn list( &self, limit: usize, prefix: Option<&str>, ) -> Result<Vec<ArchivedSessionSummary>, String>
Lists archived sessions, most recent first.
Sourcefn retrieve(&self, session_id: &str) -> Result<Vec<u8>, String>
fn retrieve(&self, session_id: &str) -> Result<Vec<u8>, String>
Retrieves the compressed archive data for a session.
Sourcefn is_available(&self) -> bool
fn is_available(&self) -> bool
Returns true if the storage backend is available.