pub struct ReconnectionManager { /* private fields */ }Expand description
Reconnection manager with exponential backoff
Implementations§
Source§impl ReconnectionManager
impl ReconnectionManager
Sourcepub fn new(config: ReconnectionConfig) -> Self
pub fn new(config: ReconnectionConfig) -> Self
Create a new reconnection manager
Sourcepub fn should_reconnect(&self) -> bool
pub fn should_reconnect(&self) -> bool
Check if reconnection should continue
Sourcepub fn get_backoff_delay(&self) -> Duration
pub fn get_backoff_delay(&self) -> Duration
Get the current backoff delay
Sourcepub fn record_attempt(&self)
pub fn record_attempt(&self)
Record a reconnection attempt and update backoff
Sourcepub fn get_attempt_count(&self) -> u32
pub fn get_attempt_count(&self) -> u32
Get current attempt count
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ReconnectionManager
impl RefUnwindSafe for ReconnectionManager
impl Send for ReconnectionManager
impl Sync for ReconnectionManager
impl Unpin for ReconnectionManager
impl UnwindSafe for ReconnectionManager
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