pub struct ExchangeConfig {
pub exchange: String,
pub compression: CompressionConfig,
pub custom_ping_message: Option<String>,
pub custom_pong_response: Option<String>,
pub send_unsolicited_pongs: bool,
pub ping_interval_override: Option<u64>,
}Expand description
Exchange-specific WebSocket configuration
Fields§
§exchange: StringExchange name
compression: CompressionConfigCompression configuration
custom_ping_message: Option<String>Custom ping message (if exchange requires specific format)
custom_pong_response: Option<String>Custom pong response (if exchange requires specific format)
send_unsolicited_pongs: boolWhether to send unsolicited pongs
ping_interval_override: Option<u64>Ping interval override (milliseconds)
Implementations§
Source§impl ExchangeConfig
impl ExchangeConfig
Sourcepub fn binance() -> Self
pub fn binance() -> Self
Create configuration for Binance
Note: Binance doesn’t support WebSocket compression
Sourcepub fn binance_futures() -> Self
pub fn binance_futures() -> Self
Create configuration for Binance Futures
Known issue: window_bits=15 causes JSON errors (missing last 2 bytes)
Sourcepub fn bybit() -> Self
pub fn bybit() -> Self
Create configuration for Bybit
Note: Bybit has known issues with compression negotiation
Sourcepub fn bithumb() -> Self
pub fn bithumb() -> Self
Create configuration for Bithumb
Note: No documented compression support
Sourcepub fn for_exchange(exchange: &str) -> Self
pub fn for_exchange(exchange: &str) -> Self
Get configuration for a specific exchange
Trait Implementations§
Source§impl Clone for ExchangeConfig
impl Clone for ExchangeConfig
Source§fn clone(&self) -> ExchangeConfig
fn clone(&self) -> ExchangeConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExchangeConfig
impl Debug for ExchangeConfig
Auto Trait Implementations§
impl Freeze for ExchangeConfig
impl RefUnwindSafe for ExchangeConfig
impl Send for ExchangeConfig
impl Sync for ExchangeConfig
impl Unpin for ExchangeConfig
impl UnwindSafe for ExchangeConfig
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