pub struct ReconnectToServer {
pub addr: ServerAddr,
pub delay: Option<Duration>,
}Expand description
The result of a reconnect-to-server callback, specifying which server to connect to and how long to wait before attempting.
Returned from the callback set via
ConnectOptions::reconnect_to_server_callback.
Fields§
§addr: ServerAddrThe server to connect to. Must be from the pool provided to the callback; if not, the library falls back to default server selection.
delay: Option<Duration>Delay before connecting. None uses the default reconnect delay
(exponential backoff). Some(Duration::ZERO) reconnects immediately.
Trait Implementations§
Source§impl Clone for ReconnectToServer
impl Clone for ReconnectToServer
Source§fn clone(&self) -> ReconnectToServer
fn clone(&self) -> ReconnectToServer
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ReconnectToServer
impl RefUnwindSafe for ReconnectToServer
impl Send for ReconnectToServer
impl Sync for ReconnectToServer
impl Unpin for ReconnectToServer
impl UnsafeUnpin for ReconnectToServer
impl UnwindSafe for ReconnectToServer
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