pub struct InMemoryIdempotencyStore { /* private fields */ }Expand description
In-memory idempotency store for testing and development
Implementations§
Trait Implementations§
Source§impl Debug for InMemoryIdempotencyStore
impl Debug for InMemoryIdempotencyStore
Source§impl Default for InMemoryIdempotencyStore
impl Default for InMemoryIdempotencyStore
Source§impl IdempotencyStore for InMemoryIdempotencyStore
impl IdempotencyStore for InMemoryIdempotencyStore
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 InMemoryIdempotencyStore
impl !RefUnwindSafe for InMemoryIdempotencyStore
impl Send for InMemoryIdempotencyStore
impl Sync for InMemoryIdempotencyStore
impl Unpin for InMemoryIdempotencyStore
impl !UnwindSafe for InMemoryIdempotencyStore
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