pub struct ReconnectionHandler { /* private fields */ }
Expand description
Handles reconnection logic with exponential backoff
Implementations§
Source§impl ReconnectionHandler
impl ReconnectionHandler
Sourcepub fn new(
config: ReconnectionConfig,
connection_manager: Weak<ConnectionManager>,
) -> Self
pub fn new( config: ReconnectionConfig, connection_manager: Weak<ConnectionManager>, ) -> Self
Creates a new reconnection handler
Sourcepub fn set_connection_manager(
&self,
_connection_manager: Weak<ConnectionManager>,
)
pub fn set_connection_manager( &self, _connection_manager: Weak<ConnectionManager>, )
Sets the connection manager reference
Sourcepub async fn trigger_reconnection(&self, reason: DisconnectionReason)
pub async fn trigger_reconnection(&self, reason: DisconnectionReason)
Triggers a reconnection attempt
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ReconnectionHandler
impl !RefUnwindSafe for ReconnectionHandler
impl Send for ReconnectionHandler
impl Sync for ReconnectionHandler
impl Unpin for ReconnectionHandler
impl !UnwindSafe for ReconnectionHandler
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