Skip to main content

SessionArchiveStorage

Trait SessionArchiveStorage 

Source
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§

Source

fn store(&self, session_id: &str, data: &[u8]) -> Result<(), String>

Stores a compressed archive for the given session.

Source

fn list( &self, limit: usize, prefix: Option<&str>, ) -> Result<Vec<ArchivedSessionSummary>, String>

Lists archived sessions, most recent first.

Source

fn retrieve(&self, session_id: &str) -> Result<Vec<u8>, String>

Retrieves the compressed archive data for a session.

Source

fn is_available(&self) -> bool

Returns true if the storage backend is available.

Implementors§