pub struct RetryConfig(/* private fields */);Expand description
The configuration for retry behavior.
Implementations§
Source§impl RetryConfig
impl RetryConfig
Sourcepub fn new<F, I, IN>(duration_generator: F) -> Self
pub fn new<F, I, IN>(duration_generator: F) -> Self
Create a retry configuration with given duration_generator.
duration_generator is a function that returns a duration iterator.
Each item yielded by the iterator indicates the delay time before next connection attempt after a disconnection occurs.
If None is returned, the stream fails.
The default implementation uses BEBIterator.
Trait Implementations§
Source§impl Clone for RetryConfig
impl Clone for RetryConfig
Source§fn clone(&self) -> RetryConfig
fn clone(&self) -> RetryConfig
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 RetryConfig
impl Debug for RetryConfig
Source§impl Default for RetryConfig
impl Default for RetryConfig
Source§impl From<RetryConfig> for ReconnectOptions
impl From<RetryConfig> for ReconnectOptions
Source§fn from(o: RetryConfig) -> Self
fn from(o: RetryConfig) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for RetryConfig
impl !RefUnwindSafe for RetryConfig
impl Send for RetryConfig
impl Sync for RetryConfig
impl Unpin for RetryConfig
impl !UnwindSafe for RetryConfig
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