pub struct Storage { /* private fields */ }Implementations§
Source§impl Storage
impl Storage
pub fn open(db_path: PathBuf) -> Result<Self>
pub fn ensure_primary_runtime( &self, codex_home: Option<String>, codex_binary: String, ) -> Result<RuntimeRecord>
pub fn list_runtimes(&self) -> Result<Vec<RuntimeRecord>>
pub fn get_runtime(&self, runtime_id: &str) -> Result<Option<RuntimeRecord>>
pub fn upsert_runtime(&self, runtime: &RuntimeRecord) -> Result<()>
pub fn remove_runtime(&self, runtime_id: &str) -> Result<()>
pub fn list_workspaces(&self) -> Result<Vec<WorkspaceRecord>>
pub fn get_workspace( &self, workspace_id: &str, ) -> Result<Option<WorkspaceRecord>>
pub fn upsert_workspace( &self, display_name: &str, root_path: &Path, trusted: bool, ) -> Result<WorkspaceRecord>
pub fn append_event( &self, event_type: &str, runtime_id: Option<&str>, thread_id: Option<&str>, payload: &Value, ) -> Result<PersistedEvent>
pub fn replay_events_after(&self, last_seq: i64) -> Result<Vec<PersistedEvent>>
pub fn load_thread_events(&self, thread_id: &str) -> Result<Vec<PersistedEvent>>
pub fn save_mobile_session_ack( &self, device_id: &str, last_ack_seq: i64, ) -> Result<()>
pub fn get_mobile_session_ack(&self, device_id: &str) -> Result<Option<i64>>
pub fn upsert_thread_index(&self, thread: &ThreadSummary) -> Result<()>
pub fn get_thread_index(&self, thread_id: &str) -> Result<Option<ThreadSummary>>
pub fn list_thread_index( &self, workspace_id: Option<&str>, runtime_id: Option<&str>, archived: Option<bool>, search_term: Option<&str>, ) -> Result<Vec<ThreadSummary>>
pub fn save_thread_note( &self, thread_id: &str, note: Option<&str>, ) -> Result<()>
pub fn set_thread_archived(&self, thread_id: &str, archived: bool) -> Result<()>
pub fn put_pending_request( &self, request: &PendingServerRequestRecord, ) -> Result<()>
pub fn get_pending_request( &self, request_id: &str, ) -> Result<Option<PendingServerRequestRecord>>
pub fn list_pending_requests(&self) -> Result<Vec<PendingServerRequestRecord>>
pub fn remove_pending_request(&self, request_id: &str) -> Result<()>
pub fn clear_pending_requests(&self) -> Result<()>
Trait Implementations§
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