pub struct Idempotency { /* private fields */ }Expand description
Idempotency-key middleware, see the module documentation
Implementations§
Source§impl Idempotency
impl Idempotency
pub fn with_store(store: impl IdempotencyStore) -> Self
Sourcepub fn methods<I: IntoIterator<Item = Method>>(self, methods: I) -> Self
pub fn methods<I: IntoIterator<Item = Method>>(self, methods: I) -> Self
Methods the key applies to (default POST and PATCH; PUT and DELETE
are idempotent by definition)
Sourcepub fn ttl(self, ttl: Duration) -> Self
pub fn ttl(self, ttl: Duration) -> Self
How long a finished response can be replayed (default 24 hours)
Sourcepub fn lock_ttl(self, lock_ttl: Duration) -> Self
pub fn lock_ttl(self, lock_ttl: Duration) -> Self
How long a running request blocks retries if it never finishes (default 60 seconds)
Trait Implementations§
Source§impl Default for Idempotency
impl Default for Idempotency
Auto Trait Implementations§
impl !RefUnwindSafe for Idempotency
impl !UnwindSafe for Idempotency
impl Freeze for Idempotency
impl Send for Idempotency
impl Sync for Idempotency
impl Unpin for Idempotency
impl UnsafeUnpin for Idempotency
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