pub struct WorkflowStore { /* private fields */ }Expand description
Persistent workflow store backed by .awf files.
Implementations§
Source§impl WorkflowStore
impl WorkflowStore
Sourcepub fn open(path: impl AsRef<Path>) -> WorkflowResult<Self>
pub fn open(path: impl AsRef<Path>) -> WorkflowResult<Self>
Open or create a workflow store at the given path.
Sourcepub fn open_memory() -> Self
pub fn open_memory() -> Self
Open an in-memory store (no persistence).
Sourcepub fn save(&mut self) -> WorkflowResult<()>
pub fn save(&mut self) -> WorkflowResult<()>
Save all workflows to .awf file.
Sourcepub fn insert(&mut self, workflow: Workflow) -> WorkflowResult<()>
pub fn insert(&mut self, workflow: Workflow) -> WorkflowResult<()>
Add a workflow.
Sourcepub fn get(&self, id: &str) -> WorkflowResult<&Workflow>
pub fn get(&self, id: &str) -> WorkflowResult<&Workflow>
Get a workflow by ID.
Sourcepub fn remove(&mut self, id: &str) -> WorkflowResult<Workflow>
pub fn remove(&mut self, id: &str) -> WorkflowResult<Workflow>
Remove a workflow.
Sourcepub fn set_auto_save(&mut self, enabled: bool)
pub fn set_auto_save(&mut self, enabled: bool)
Set auto-save behavior.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WorkflowStore
impl RefUnwindSafe for WorkflowStore
impl Send for WorkflowStore
impl Sync for WorkflowStore
impl Unpin for WorkflowStore
impl UnsafeUnpin for WorkflowStore
impl UnwindSafe for WorkflowStore
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