pub struct RedisContextStore<C: Context + Merge + Default> { /* private fields */ }Expand description
Redis implementation of the ContextStore trait.
Implementations§
Source§impl<C: Context + Merge + Default> RedisContextStore<C>
impl<C: Context + Merge + Default> RedisContextStore<C>
Sourcepub fn new(client: RedisClient) -> Self
pub fn new(client: RedisClient) -> Self
Create a new Redis context store with the given client.
Trait Implementations§
Source§impl<C: Clone + Context + Merge + Default> Clone for RedisContextStore<C>
impl<C: Clone + Context + Merge + Default> Clone for RedisContextStore<C>
Source§fn clone(&self) -> RedisContextStore<C>
fn clone(&self) -> RedisContextStore<C>
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<C> ContextStore<C> for RedisContextStore<C>
impl<C> ContextStore<C> for RedisContextStore<C>
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<C>, ContextStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn set<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
ctx: C,
) -> Pin<Box<dyn Future<Output = Result<(), ContextStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn merge<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
ctx: C,
) -> Pin<Box<dyn Future<Output = Result<(), ContextStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Auto Trait Implementations§
impl<C> Freeze for RedisContextStore<C>
impl<C> !RefUnwindSafe for RedisContextStore<C>
impl<C> Send for RedisContextStore<C>
impl<C> Sync for RedisContextStore<C>
impl<C> Unpin for RedisContextStore<C>where
C: Unpin,
impl<C> !UnwindSafe for RedisContextStore<C>
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