pub struct WebSocketConfig {
pub reconnect_attempts: u32,
pub base_delay_ms: u64,
pub max_delay_ms: u64,
pub ping_interval_secs: u64,
pub pong_timeout_secs: u64,
pub auto_reconnect: bool,
pub auto_resubscribe: bool,
pub auth_token: Option<String>,
pub event_channel_capacity: usize,
pub command_channel_capacity: usize,
}Expand description
WebSocket client configuration
Fields§
§reconnect_attempts: u32Number of reconnect attempts before giving up
base_delay_ms: u64Base delay for exponential backoff (ms)
max_delay_ms: u64Maximum delay for exponential backoff (ms)
ping_interval_secs: u64Interval for client ping (seconds)
pong_timeout_secs: u64Timeout for pong response (seconds). Connection is considered dead if no pong received within this time.
auto_reconnect: boolWhether to automatically reconnect on disconnect
auto_resubscribe: boolWhether to automatically re-subscribe after reconnect
auth_token: Option<String>Optional authentication token for private user streams
event_channel_capacity: usizeCapacity of the event channel. Default: 1000
command_channel_capacity: usizeCapacity of the command channel. Default: 100
Trait Implementations§
Source§impl Clone for WebSocketConfig
impl Clone for WebSocketConfig
Source§fn clone(&self) -> WebSocketConfig
fn clone(&self) -> WebSocketConfig
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 WebSocketConfig
impl Debug for WebSocketConfig
Auto Trait Implementations§
impl Freeze for WebSocketConfig
impl RefUnwindSafe for WebSocketConfig
impl Send for WebSocketConfig
impl Sync for WebSocketConfig
impl Unpin for WebSocketConfig
impl UnwindSafe for WebSocketConfig
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more