pub struct FixedReconnect {
pub attempts: usize,
pub delay: Duration,
}
Expand description
simple Fixed sized implementation for the ReconnectionPolicy trait.
Fields§
§attempts: usize
§delay: Duration
Trait Implementations§
Source§impl ReconnectionPolicy for FixedReconnect
impl ReconnectionPolicy for FixedReconnect
Source§fn should_retry(&self, attempts: usize) -> ControlFlow<(), Duration>
fn should_retry(&self, attempts: usize) -> ControlFlow<(), Duration>
this function will indicate that the handler should attempt for a new reconnection or not. Read more
Auto Trait Implementations§
impl Freeze for FixedReconnect
impl RefUnwindSafe for FixedReconnect
impl Send for FixedReconnect
impl Sync for FixedReconnect
impl Unpin for FixedReconnect
impl UnwindSafe for FixedReconnect
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