pub struct BackoffConfig {
pub initial_delay: Duration,
pub max_delay: Duration,
pub total_timeout: Duration,
pub max_attempts: usize,
}Expand description
Configuration for exponential backoff when issuing storage requests.
Fields§
§initial_delay: DurationInitial delay applied before the second attempt.
max_delay: DurationMaximum delay between attempts.
total_timeout: DurationTotal time budget for the request, including all retries.
max_attempts: usizeMaximum number of attempts before giving up.
Implementations§
Source§impl BackoffConfig
impl BackoffConfig
Sourcepub fn standard_operation() -> Self
pub fn standard_operation() -> Self
Creates a configuration using Storage defaults (1s base, up to 64s, 2m timeout).
Sourcepub fn upload_operation(max_retry_time: Duration) -> Self
pub fn upload_operation(max_retry_time: Duration) -> Self
Configuration tuned for long running uploads (same defaults as the JS SDK).
pub fn with_total_timeout(self, timeout: Duration) -> Self
Trait Implementations§
Source§impl Clone for BackoffConfig
impl Clone for BackoffConfig
Source§fn clone(&self) -> BackoffConfig
fn clone(&self) -> BackoffConfig
Returns a duplicate 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 BackoffConfig
impl RefUnwindSafe for BackoffConfig
impl Send for BackoffConfig
impl Sync for BackoffConfig
impl Unpin for BackoffConfig
impl UnwindSafe for BackoffConfig
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