use crate::session::types::Session;
#[async_trait::async_trait]
pub trait Storage: Send + Sync {
async fn save_session(&self, session: &Session) -> std::io::Result<()>;
async fn load_session(&self, session_id: &str) -> std::io::Result<Option<Session>>;
async fn delete_session(&self, session_id: &str) -> std::io::Result<bool>;
}
#[async_trait::async_trait]
pub trait AttachmentReader: Send + Sync {
async fn read_attachment(
&self,
session_id: &str,
attachment_id: &str,
) -> std::io::Result<Option<(Vec<u8>, String)>>;
}