pub struct FileStateStore { /* private fields */ }Expand description
File-based state store for production use
Implementations§
Source§impl FileStateStore
impl FileStateStore
Sourcepub fn new(base_dir: PathBuf) -> Result<Self, WorkflowError>
pub fn new(base_dir: PathBuf) -> Result<Self, WorkflowError>
Create a new file-based state store
Trait Implementations§
Source§impl StateStore for FileStateStore
impl StateStore for FileStateStore
Source§fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 WorkflowState,
) -> Pin<Box<dyn Future<Output = Result<(), WorkflowError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 WorkflowState,
) -> Pin<Box<dyn Future<Output = Result<(), WorkflowError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Save workflow state
Source§fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
instance_id: &'life1 WorkflowId,
) -> Pin<Box<dyn Future<Output = Result<WorkflowState, WorkflowError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
instance_id: &'life1 WorkflowId,
) -> Pin<Box<dyn Future<Output = Result<WorkflowState, WorkflowError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Load workflow state
Source§fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
instance_id: &'life1 WorkflowId,
) -> Pin<Box<dyn Future<Output = Result<(), WorkflowError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
instance_id: &'life1 WorkflowId,
) -> Pin<Box<dyn Future<Output = Result<(), WorkflowError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete workflow state
Source§fn list<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkflowId>, WorkflowError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkflowId>, WorkflowError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List all workflow instances
Source§fn list_by_status<'life0, 'async_trait>(
&'life0 self,
target_status: WorkflowStatus,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkflowId>, WorkflowError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_by_status<'life0, 'async_trait>(
&'life0 self,
target_status: WorkflowStatus,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkflowId>, WorkflowError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List workflow instances by status
Auto Trait Implementations§
impl Freeze for FileStateStore
impl !RefUnwindSafe for FileStateStore
impl Send for FileStateStore
impl Sync for FileStateStore
impl Unpin for FileStateStore
impl !UnwindSafe for FileStateStore
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