pub struct CachedStateStore<S: StateStore> { /* private fields */ }Expand description
State store with caching for improved performance
Implementations§
Source§impl<S: StateStore> CachedStateStore<S>
impl<S: StateStore> CachedStateStore<S>
Sourcepub async fn cleanup_cache(&self)
pub async fn cleanup_cache(&self)
Clean up expired cache entries
Trait Implementations§
Source§impl<S: StateStore> StateStore for CachedStateStore<S>
impl<S: StateStore> StateStore for CachedStateStore<S>
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,
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,
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<S> Freeze for CachedStateStore<S>where
S: Freeze,
impl<S> !RefUnwindSafe for CachedStateStore<S>
impl<S> Send for CachedStateStore<S>
impl<S> Sync for CachedStateStore<S>
impl<S> Unpin for CachedStateStore<S>where
S: Unpin,
impl<S> !UnwindSafe for CachedStateStore<S>
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