pub struct ReconnectStrategy { /* private fields */ }Expand description
Reconnection strategy
Implementations§
Source§impl ReconnectStrategy
impl ReconnectStrategy
Sourcepub const fn new(config: ReconnectConfig) -> Self
pub const fn new(config: ReconnectConfig) -> Self
Create a new reconnection strategy
Sourcepub fn should_reconnect(&self) -> bool
pub fn should_reconnect(&self) -> bool
Check if reconnection should be attempted
Sourcepub fn next_delay(&self) -> Option<Duration>
pub fn next_delay(&self) -> Option<Duration>
Get the next reconnection delay
Sourcepub const fn mark_failure(&self)
pub const fn mark_failure(&self)
Mark a reconnection failure
Auto Trait Implementations§
impl !Freeze for ReconnectStrategy
impl !RefUnwindSafe for ReconnectStrategy
impl Send for ReconnectStrategy
impl Sync for ReconnectStrategy
impl Unpin for ReconnectStrategy
impl UnwindSafe for ReconnectStrategy
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