pub struct SessionManager { /* private fields */ }Expand description
Session manager — wraps WorkflowStore with lifecycle management.
Implementations§
Source§impl SessionManager
impl SessionManager
Sourcepub fn open(path: impl AsRef<Path>) -> Result<Self>
pub fn open(path: impl AsRef<Path>) -> Result<Self>
Open a session with a workflow store at the given path.
Sourcepub fn open_memory() -> Self
pub fn open_memory() -> Self
Open in-memory session (testing).
Sourcepub fn store_mut(&mut self) -> &mut WorkflowStore
pub fn store_mut(&mut self) -> &mut WorkflowStore
Get mutable access to the store.
Sourcepub fn store(&self) -> &WorkflowStore
pub fn store(&self) -> &WorkflowStore
Get read access to the store.
Sourcepub fn session_id(&self) -> &str
pub fn session_id(&self) -> &str
Get session ID.
Sourcepub fn set_profile(&mut self, profile: AutonomicProfile)
pub fn set_profile(&mut self, profile: AutonomicProfile)
Set autonomic profile.
Sourcepub fn mutation_count(&self) -> u64
pub fn mutation_count(&self) -> u64
Get mutation count since session start.
Sourcepub fn maintenance_tick(&mut self) -> Result<()>
pub fn maintenance_tick(&mut self) -> Result<()>
Run periodic maintenance tick (autosave if needed).
Sourcepub fn force_save(&mut self) -> Result<()>
pub fn force_save(&mut self) -> Result<()>
Force save.
Trait Implementations§
Source§impl Drop for SessionManager
impl Drop for SessionManager
Auto Trait Implementations§
impl Freeze for SessionManager
impl RefUnwindSafe for SessionManager
impl Send for SessionManager
impl Sync for SessionManager
impl Unpin for SessionManager
impl UnsafeUnpin for SessionManager
impl UnwindSafe for SessionManager
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