pub struct Storage { /* private fields */ }Implementations§
Source§impl Storage
impl Storage
pub async fn new(base: impl AsRef<Path>) -> Result<Self>
pub async fn list_sessions(&self) -> Vec<Session>
pub async fn list_sessions_scoped( &self, scope: SessionListScope, ) -> Vec<Session>
pub async fn get_session(&self, id: &str) -> Option<Session>
pub async fn save_session(&self, session: Session) -> Result<()>
pub async fn repair_sessions_from_file_store( &self, ) -> Result<SessionRepairStats>
pub async fn run_legacy_storage_repair_scan( &self, force: bool, ) -> Result<LegacyRepairRunReport>
pub async fn delete_session(&self, id: &str) -> Result<bool>
pub async fn append_message(&self, session_id: &str, msg: Message) -> Result<()>
pub async fn fork_session(&self, id: &str) -> Result<Option<Session>>
pub async fn revert_session(&self, id: &str) -> Result<bool>
pub async fn unrevert_session(&self, id: &str) -> Result<bool>
pub async fn set_archived(&self, id: &str, archived: bool) -> Result<bool>
pub async fn set_summary(&self, id: &str, summary: String) -> Result<bool>
pub async fn children(&self, parent_id: &str) -> Vec<Session>
pub async fn session_status(&self, id: &str) -> Option<Value>
pub async fn session_diff(&self, id: &str) -> Option<Value>
pub async fn set_todos(&self, id: &str, todos: Vec<Value>) -> Result<()>
pub async fn get_todos(&self, id: &str) -> Vec<Value>
pub async fn add_question_request( &self, session_id: &str, message_id: &str, questions: Vec<Value>, ) -> Result<QuestionRequest>
pub async fn list_question_requests(&self) -> Vec<QuestionRequest>
pub async fn reply_question(&self, request_id: &str) -> Result<bool>
pub async fn reject_question(&self, request_id: &str) -> Result<bool>
pub async fn attach_session_to_workspace( &self, session_id: &str, target_workspace: &str, reason_tag: &str, ) -> Result<Option<Session>>
Auto Trait Implementations§
impl !Freeze for Storage
impl !RefUnwindSafe for Storage
impl Send for Storage
impl Sync for Storage
impl Unpin for Storage
impl UnsafeUnpin for Storage
impl !UnwindSafe for Storage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more