pub struct InMemoryIdempotencyStore { /* private fields */ }Expand description
In-memory idempotency store for development and testing
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 upsert_result<'life0, 'async_trait>(
&'life0 self,
result: IdempotentResult,
) -> Pin<Box<dyn Future<Output = Result<bool, IdempotencyError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn upsert_result<'life0, 'async_trait>(
&'life0 self,
result: IdempotentResult,
) -> Pin<Box<dyn Future<Output = Result<bool, IdempotencyError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Upsert a result by idempotency key
Returns true if this is a new key, false if it already existed
Source§fn get_result<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 IdempotencyKey,
) -> Pin<Box<dyn Future<Output = Result<Option<IdempotentResult>, IdempotencyError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_result<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 IdempotencyKey,
) -> Pin<Box<dyn Future<Output = Result<Option<IdempotentResult>, IdempotencyError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get a result by idempotency key
Source§fn cleanup_expired<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64, IdempotencyError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn cleanup_expired<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64, IdempotencyError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Delete expired results (cleanup)
Source§fn stats<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<IdempotencyStats, IdempotencyError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stats<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<IdempotencyStats, IdempotencyError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get statistics about the store
Auto Trait Implementations§
impl Freeze for InMemoryIdempotencyStore
impl !RefUnwindSafe for InMemoryIdempotencyStore
impl Send for InMemoryIdempotencyStore
impl Sync for InMemoryIdempotencyStore
impl Unpin for InMemoryIdempotencyStore
impl UnsafeUnpin 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