pub struct InMemoryStateStore { /* private fields */ }Expand description
A default in-memory implementation of TaskStateStore (for reference/testing)
Implementations§
Trait Implementations§
Source§impl Default for InMemoryStateStore
impl Default for InMemoryStateStore
Source§impl TaskStateStore for InMemoryStateStore
impl TaskStateStore for InMemoryStateStore
Source§fn save_state<'life0, 'async_trait>(
&'life0 self,
state: PersistedTaskState,
) -> Pin<Box<dyn Future<Output = SupervisorResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn save_state<'life0, 'async_trait>(
&'life0 self,
state: PersistedTaskState,
) -> Pin<Box<dyn Future<Output = SupervisorResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Save the state of a task
Source§fn load_state<'life0, 'life1, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = SupervisorResult<Option<PersistedTaskState>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_state<'life0, 'life1, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = SupervisorResult<Option<PersistedTaskState>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Load the state of a task by ID
Source§fn load_all_states<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = SupervisorResult<Vec<PersistedTaskState>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load_all_states<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = SupervisorResult<Vec<PersistedTaskState>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Load all saved task states
Source§fn delete_state<'life0, 'life1, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = SupervisorResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_state<'life0, 'life1, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = SupervisorResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete the state of a task
Auto Trait Implementations§
impl !Freeze for InMemoryStateStore
impl !RefUnwindSafe for InMemoryStateStore
impl Send for InMemoryStateStore
impl Sync for InMemoryStateStore
impl Unpin for InMemoryStateStore
impl UnsafeUnpin for InMemoryStateStore
impl UnwindSafe for InMemoryStateStore
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