pub enum RequestStrategy {
Once,
Idempotent(IdempotencyKey),
Retry(u32),
ExponentialBackoff(u32),
}
Expand description
Possible strategies for sending Stripe API requests, including retry behavior and use of idempotency keys.
Variants§
Once
Run the request once.
Idempotent(IdempotencyKey)
Run it once with a given idempotency key.
Retry(u32)
This strategy will retry the request up to the specified number of times using the same, random, idempotency key, up to n times.
ExponentialBackoff(u32)
This strategy will retry the request up to the specified number of times using the same, random, idempotency key with exponential backoff, up to n times.
Implementations§
Trait Implementations§
Source§impl Clone for RequestStrategy
impl Clone for RequestStrategy
Source§fn clone(&self) -> RequestStrategy
fn clone(&self) -> RequestStrategy
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 moreAuto Trait Implementations§
impl Freeze for RequestStrategy
impl RefUnwindSafe for RequestStrategy
impl Send for RequestStrategy
impl Sync for RequestStrategy
impl Unpin for RequestStrategy
impl UnwindSafe for RequestStrategy
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