pub struct RedisIdempotencyStore { /* private fields */ }Expand description
Redis-based idempotency store for production use
Implementations§
Trait Implementations§
Source§impl IdempotencyStore for RedisIdempotencyStore
impl IdempotencyStore for RedisIdempotencyStore
Source§fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Arc<JobResult>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Arc<JobResult>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Check if a result exists for the given idempotency key
Source§fn set<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
result: Arc<JobResult>,
ttl: Duration,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn set<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
result: Arc<JobResult>,
ttl: Duration,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Store a result with the given idempotency key and TTL
Auto Trait Implementations§
impl Freeze for RedisIdempotencyStore
impl RefUnwindSafe for RedisIdempotencyStore
impl Send for RedisIdempotencyStore
impl Sync for RedisIdempotencyStore
impl Unpin for RedisIdempotencyStore
impl UnwindSafe for RedisIdempotencyStore
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