pub struct Idempotency { /* private fields */ }Implementations§
Source§impl Idempotency
impl Idempotency
Sourcepub fn new(cache: &CacheStore) -> Self
pub fn new(cache: &CacheStore) -> Self
Remember answers for 24 hours, which is Stripe’s window and long enough for any retry policy a client would plausibly run.
pub fn with_driver(store: Arc<dyn Cache>) -> Self
Sourcepub fn remember_for(self, ttl: Duration) -> Self
pub fn remember_for(self, ttl: Duration) -> Self
How long an answer is remembered.
Trait Implementations§
Source§impl Clone for Idempotency
impl Clone for Idempotency
Source§fn clone(&self) -> Idempotency
fn clone(&self) -> Idempotency
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto 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