pub struct BinanceWsConfig {
pub url: String,
pub channel_config: WsChannelConfig,
pub backpressure_strategy: BackpressureStrategy,
pub shutdown_timeout_ms: u64,
}Expand description
Configuration for Binance WebSocket client.
Combines all configuration options for creating a BinanceWs instance.
Fields§
§url: StringWebSocket endpoint URL
channel_config: WsChannelConfigChannel capacity configuration
backpressure_strategy: BackpressureStrategyBackpressure strategy for handling channel overflow
shutdown_timeout_ms: u64Shutdown timeout in milliseconds
Implementations§
Source§impl BinanceWsConfig
impl BinanceWsConfig
Sourcepub fn with_channel_config(self, config: WsChannelConfig) -> Self
pub fn with_channel_config(self, config: WsChannelConfig) -> Self
Sets the channel configuration
Sourcepub fn with_backpressure(self, strategy: BackpressureStrategy) -> Self
pub fn with_backpressure(self, strategy: BackpressureStrategy) -> Self
Sets the backpressure strategy
Sourcepub fn with_shutdown_timeout(self, timeout_ms: u64) -> Self
pub fn with_shutdown_timeout(self, timeout_ms: u64) -> Self
Sets the shutdown timeout
Trait Implementations§
Source§impl Clone for BinanceWsConfig
impl Clone for BinanceWsConfig
Source§fn clone(&self) -> BinanceWsConfig
fn clone(&self) -> BinanceWsConfig
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 moreAuto Trait Implementations§
impl Freeze for BinanceWsConfig
impl RefUnwindSafe for BinanceWsConfig
impl Send for BinanceWsConfig
impl Sync for BinanceWsConfig
impl Unpin for BinanceWsConfig
impl UnsafeUnpin for BinanceWsConfig
impl UnwindSafe for BinanceWsConfig
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