pub struct BackoffConfig {
pub policy: BackoffPolicy,
pub limit: usize,
}Expand description
Fields§
§policy: BackoffPolicyThe mathematical strategy used to increase delay.
limit: usizeThe maximum number of spins allowed in a single backoff iteration.
Implementations§
Source§impl BackoffConfig
impl BackoffConfig
pub fn linear(limit: usize) -> BackoffConfig
pub fn exponential(limit: usize) -> BackoffConfig
Source§impl BackoffConfig
impl BackoffConfig
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 moreSource§impl Debug for BackoffConfig
impl Debug for BackoffConfig
impl Copy for BackoffConfig
Auto Trait Implementations§
impl Freeze for BackoffConfig
impl RefUnwindSafe for BackoffConfig
impl Send for BackoffConfig
impl Sync for BackoffConfig
impl Unpin for BackoffConfig
impl UnsafeUnpin 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