pub struct StateManager { /* private fields */ }
Implementations§
Source§impl StateManager
impl StateManager
pub fn new(store: Arc<dyn StateStore>) -> Self
Sourcepub fn subscribe(&self) -> Receiver<StateEvent>
pub fn subscribe(&self) -> Receiver<StateEvent>
Subscribe to state events
pub async fn create_session(&self, name: String) -> Result<SessionState>
pub async fn get_session(&self, session_id: &str) -> Option<SessionState>
pub async fn list_sessions(&self) -> Vec<SessionState>
pub async fn update_session(&self, session: SessionState) -> Result<()>
pub async fn delete_session(&self, session_id: &str) -> Result<()>
pub async fn create_pane(&self, pane: PaneState) -> Result<PaneState>
pub async fn get_pane(&self, pane_id: &str) -> Option<PaneState>
pub async fn update_pane(&self, pane: PaneState) -> Result<()>
pub async fn delete_pane(&self, pane_id: &str) -> Result<()>
pub async fn delete_panes_for_session(&self, session_id: &str) -> Result<()>
Sourcepub async fn load_from_storage(&self) -> Result<()>
pub async fn load_from_storage(&self) -> Result<()>
Load state from storage on startup
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StateManager
impl !RefUnwindSafe for StateManager
impl Send for StateManager
impl Sync for StateManager
impl Unpin for StateManager
impl !UnwindSafe for StateManager
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