#[non_exhaustive]pub struct RetryPolicy { /* private fields */ }Implementations§
Source§impl RetryPolicy
impl RetryPolicy
pub fn none() -> Self
pub fn transient() -> Self
pub fn max_retries(self, n: u32) -> Self
pub fn initial_backoff(self, d: Duration) -> Self
pub fn max_backoff(self, d: Duration) -> Self
pub fn backoff_factor(self, factor: f64) -> Self
pub fn jitter(self, on: bool) -> Self
pub fn max_retry_after(self, d: Duration) -> Self
pub fn on_status(self, code: u16) -> Self
pub fn retry_on(self, triggers: impl IntoIterator<Item = RetryTrigger>) -> Self
pub fn allow_non_idempotent(self, allow: bool) -> Self
pub fn rotate_proxies<P: Into<ProxyConfig>>( self, proxies: impl IntoIterator<Item = P>, ) -> Self
pub fn retry_if<F>(self, f: F) -> Self
pub fn wait_header(self, name: impl Into<String>, format: WaitFormat) -> Self
pub fn skip_blocks(self, rules: BlockRules) -> Self
pub fn retry_unsent(self, enabled: bool) -> Self
pub fn backoff(&self, attempt: u32) -> Duration
Trait Implementations§
Source§impl Clone for RetryPolicy
impl Clone for RetryPolicy
Source§impl Debug for RetryPolicy
impl Debug for RetryPolicy
Auto Trait Implementations§
impl Freeze for RetryPolicy
impl RefUnwindSafe for RetryPolicy
impl Send for RetryPolicy
impl Sync for RetryPolicy
impl Unpin for RetryPolicy
impl UnsafeUnpin for RetryPolicy
impl UnwindSafe for RetryPolicy
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more