pub struct IdempotencyService { /* private fields */ }Implementations§
Source§impl IdempotencyService
impl IdempotencyService
pub fn new( store: Arc<dyn IdempotencyStore>, stale_after: TimeDelta, ) -> Result<Self, IdempotencyError>
pub async fn get( &self, key: &IdempotencyKey, ) -> Result<Option<IdempotencyRecord>, IdempotencyError>
pub async fn begin( &self, key: IdempotencyKey, fingerprint: RequestFingerprint, ) -> Result<BeginOutcome, IdempotencyError>
pub async fn complete( &self, lease: IdempotencyLease, response: Value, ) -> Result<IdempotencyRecord, IdempotencyError>
pub async fn abort( &self, lease: &IdempotencyLease, ) -> Result<bool, IdempotencyError>
Trait Implementations§
Source§impl Clone for IdempotencyService
impl Clone for IdempotencyService
Source§fn clone(&self) -> IdempotencyService
fn clone(&self) -> IdempotencyService
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 IdempotencyService
impl !UnwindSafe for IdempotencyService
impl Freeze for IdempotencyService
impl Send for IdempotencyService
impl Sync for IdempotencyService
impl Unpin for IdempotencyService
impl UnsafeUnpin for IdempotencyService
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