pub struct ReconnectConfig {
pub enabled: bool,
pub base_delay_secs: u64,
pub max_delay_secs: u64,
pub max_attempts: u32,
}Expand description
Auto-reconnect behavior when the WebSocket connection drops.
Fields§
§enabled: boolEnable auto-reconnect on connection loss.
base_delay_secs: u64Initial delay before the first reconnect attempt, in seconds.
max_delay_secs: u64Maximum delay between reconnect attempts (exponential backoff cap), in seconds.
max_attempts: u32Maximum number of reconnect attempts. 0 means unlimited.
Trait Implementations§
Source§impl Clone for ReconnectConfig
impl Clone for ReconnectConfig
Source§fn clone(&self) -> ReconnectConfig
fn clone(&self) -> ReconnectConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ReconnectConfig
impl Debug for ReconnectConfig
Source§impl Default for ReconnectConfig
impl Default for ReconnectConfig
Source§impl<'de> Deserialize<'de> for ReconnectConfig
impl<'de> Deserialize<'de> for ReconnectConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ReconnectConfig
impl RefUnwindSafe for ReconnectConfig
impl Send for ReconnectConfig
impl Sync for ReconnectConfig
impl Unpin for ReconnectConfig
impl UnsafeUnpin for ReconnectConfig
impl UnwindSafe for ReconnectConfig
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