pub struct ClaimToken { /* private fields */ }Expand description
Proof that one caller, and only that caller, owns a key right now.
Carries the generation it was issued under so a late completion from an abandoned attempt is refused rather than overwriting the attempt that replaced it.
Implementations§
Source§impl ClaimToken
impl ClaimToken
Sourcepub const fn key(&self) -> &IdempotencyKey
pub const fn key(&self) -> &IdempotencyKey
The key this claim is for.
Sourcepub const fn generation(&self) -> u64
pub const fn generation(&self) -> u64
The attempt this token was issued to.
A counter, not a random value, and exposed for the error a stale claim produces. It carries no entropy and is not a secret.
Trait Implementations§
Source§impl Clone for ClaimToken
impl Clone for ClaimToken
Source§impl Debug for ClaimToken
impl Debug for ClaimToken
impl Eq for ClaimToken
Source§impl Hash for ClaimToken
impl Hash for ClaimToken
Source§impl Ord for ClaimToken
impl Ord for ClaimToken
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for ClaimToken
impl PartialEq for ClaimToken
Source§impl PartialOrd for ClaimToken
impl PartialOrd for ClaimToken
impl StructuralPartialEq for ClaimToken
Auto Trait Implementations§
impl Freeze for ClaimToken
impl RefUnwindSafe for ClaimToken
impl Send for ClaimToken
impl Sync for ClaimToken
impl Unpin for ClaimToken
impl UnsafeUnpin for ClaimToken
impl UnwindSafe for ClaimToken
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