pub trait IdempotencyStore:
Send
+ Sync
+ 'static {
// Required methods
fn begin<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
fingerprint: u64,
lock_ttl: Duration,
) -> Pin<Box<dyn Future<Output = Begin> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn complete<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
response: StoredResponse,
ttl: Duration,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn abandon<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Where idempotency keys live
Required Methods§
Sourcefn begin<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
fingerprint: u64,
lock_ttl: Duration,
) -> Pin<Box<dyn Future<Output = Begin> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn begin<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
fingerprint: u64,
lock_ttl: Duration,
) -> Pin<Box<dyn Future<Output = Begin> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Claim key for a request with this fingerprint. A claim that is never
completed must lapse after lock_ttl.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".