pub struct RedisWorkItemStateStore<W: WorkItem> { /* private fields */ }Expand description
Redis implementation of the WorkItemStateStore trait.
Implementations§
Source§impl<W: WorkItem> RedisWorkItemStateStore<W>
impl<W: WorkItem> RedisWorkItemStateStore<W>
Sourcepub fn new(client: RedisClient) -> Self
pub fn new(client: RedisClient) -> Self
Create a new Redis work item state store with the given client.
Trait Implementations§
Source§impl<W: Clone + WorkItem> Clone for RedisWorkItemStateStore<W>
impl<W: Clone + WorkItem> Clone for RedisWorkItemStateStore<W>
Source§fn clone(&self) -> RedisWorkItemStateStore<W>
fn clone(&self) -> RedisWorkItemStateStore<W>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<W: WorkItem + Serialize + DeserializeOwned> WorkItemStateStore<W> for RedisWorkItemStateStore<W>
impl<W: WorkItem + Serialize + DeserializeOwned> WorkItemStateStore<W> for RedisWorkItemStateStore<W>
Source§fn get_status<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
item: &'life2 W,
) -> Pin<Box<dyn Future<Output = Result<WorkItemStatus, WorkItemStateStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_status<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
item: &'life2 W,
) -> Pin<Box<dyn Future<Output = Result<WorkItemStatus, WorkItemStateStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get the status of a work item.
Source§fn set_status<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
item: &'life2 W,
status: WorkItemStatus,
) -> Pin<Box<dyn Future<Output = Result<(), WorkItemStateStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn set_status<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
item: &'life2 W,
status: WorkItemStatus,
) -> Pin<Box<dyn Future<Output = Result<(), WorkItemStateStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Set the status of a work item.
Source§fn increment_attempts<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
item: &'life2 W,
) -> Pin<Box<dyn Future<Output = Result<u32, WorkItemStateStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn increment_attempts<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
item: &'life2 W,
) -> Pin<Box<dyn Future<Output = Result<u32, WorkItemStateStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Increment the number of attempts for a work item.
Source§fn get_attempts<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
item: &'life2 W,
) -> Pin<Box<dyn Future<Output = Result<u32, WorkItemStateStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_attempts<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
item: &'life2 W,
) -> Pin<Box<dyn Future<Output = Result<u32, WorkItemStateStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get the number of attempts for a work item.
Source§fn reset_attempts<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
item: &'life2 W,
) -> Pin<Box<dyn Future<Output = Result<(), WorkItemStateStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn reset_attempts<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
item: &'life2 W,
) -> Pin<Box<dyn Future<Output = Result<(), WorkItemStateStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Reset the number of attempts for a work item.
Auto Trait Implementations§
impl<W> Freeze for RedisWorkItemStateStore<W>
impl<W> !RefUnwindSafe for RedisWorkItemStateStore<W>
impl<W> Send for RedisWorkItemStateStore<W>
impl<W> Sync for RedisWorkItemStateStore<W>
impl<W> Unpin for RedisWorkItemStateStore<W>where
W: Unpin,
impl<W> !UnwindSafe for RedisWorkItemStateStore<W>
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