pub struct IdempotencyKey(/* private fields */);Expand description
An opaque key the SDK attaches via the Idempotency-Key header.
Reused across all retry attempts of the same logical call — that’s how
the server’s 24h dedup window discriminates “this is a retry” from
“this is a new request.”
Implementations§
Source§impl IdempotencyKey
impl IdempotencyKey
pub fn new() -> Self
pub fn as_str(&self) -> &str
Sourcepub fn for_receipt(store: &str, receipt: &str) -> Self
pub fn for_receipt(store: &str, receipt: &str) -> Self
Deterministic key for a receipt POST, derived from the store + receipt token. All posts of the same transaction (first send, reconcile re-post, StoreKit re-delivery) share one key, so the server replays its cached response within the 24h window instead of re-verifying with the store.
Trait Implementations§
Source§impl Clone for IdempotencyKey
impl Clone for IdempotencyKey
Source§fn clone(&self) -> IdempotencyKey
fn clone(&self) -> IdempotencyKey
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IdempotencyKey
impl Debug for IdempotencyKey
Auto Trait Implementations§
impl Freeze for IdempotencyKey
impl RefUnwindSafe for IdempotencyKey
impl Send for IdempotencyKey
impl Sync for IdempotencyKey
impl Unpin for IdempotencyKey
impl UnwindSafe for IdempotencyKey
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