pub struct RetryStrategy { /* private fields */ }Expand description
Strategy used for retrying failed API calls.
Implementations§
Source§impl RetryStrategy
impl RetryStrategy
pub fn new( max_retries: u32, initial_delay: Duration, max_delay: Duration, backoff_factor: f32, ) -> SwarmResult<Self>
pub fn max_retries(&self) -> u32
pub fn initial_delay(&self) -> Duration
pub fn max_delay(&self) -> Duration
pub fn backoff_factor(&self) -> f32
Trait Implementations§
Source§impl Clone for RetryStrategy
impl Clone for RetryStrategy
Source§fn clone(&self) -> RetryStrategy
fn clone(&self) -> RetryStrategy
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 RetryStrategy
impl RefUnwindSafe for RetryStrategy
impl Send for RetryStrategy
impl Sync for RetryStrategy
impl Unpin for RetryStrategy
impl UnsafeUnpin for RetryStrategy
impl UnwindSafe for RetryStrategy
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