libpetri_debug/archive/
session_archive_storage.rs1#[derive(Debug, Clone)]
5pub struct ArchivedSessionSummary {
6 pub session_id: String,
7 pub key: String,
8 pub size_bytes: u64,
9 pub last_modified: u64,
11}
12
13pub trait SessionArchiveStorage: Send + Sync {
15 fn store(&self, session_id: &str, data: &[u8]) -> Result<(), String>;
17
18 fn list(
20 &self,
21 limit: usize,
22 prefix: Option<&str>,
23 ) -> Result<Vec<ArchivedSessionSummary>, String>;
24
25 fn retrieve(&self, session_id: &str) -> Result<Vec<u8>, String>;
27
28 fn is_available(&self) -> bool;
30}