#[repr(align(64))]pub struct WebSocketConnector { /* private fields */ }Expand description
WebSocket connector with advanced features
Implementations§
Source§impl WebSocketConnector
impl WebSocketConnector
Sourcepub fn new(
config: WebSocketConfig,
stats: SharedStats,
connection_status: Arc<RwLock<ConnectionState>>,
) -> Self
pub fn new( config: WebSocketConfig, stats: SharedStats, connection_status: Arc<RwLock<ConnectionState>>, ) -> Self
Create a new WebSocket connector
Sourcepub const fn config(&self) -> &WebSocketConfig
pub const fn config(&self) -> &WebSocketConfig
Get the configuration
Sourcepub fn get_batch_metrics(&self) -> BatchProcessingMetrics
pub fn get_batch_metrics(&self) -> BatchProcessingMetrics
Get batch processing metrics
Sourcepub fn create_websocket_options(
exchange_config: Option<&ExchangeConfig>,
) -> Options
pub fn create_websocket_options( exchange_config: Option<&ExchangeConfig>, ) -> Options
Create WebSocket options with exchange-specific settings
Sourcepub async fn process_message_batch<T, P, R>(
&self,
messages: Vec<Message>,
process_message: P,
sender: &Sender<T>,
) -> WebSocketResult<usize>
pub async fn process_message_batch<T, P, R>( &self, messages: Vec<Message>, process_message: P, sender: &Sender<T>, ) -> WebSocketResult<usize>
Process a batch of messages
Sourcepub async fn connect_with_retry(
&mut self,
url: &str,
) -> WebSocketResult<(WebSocketSink, WebSocketStream)>
pub async fn connect_with_retry( &mut self, url: &str, ) -> WebSocketResult<(WebSocketSink, WebSocketStream)>
Connect with retry and failover support
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WebSocketConnector
impl !RefUnwindSafe for WebSocketConnector
impl Send for WebSocketConnector
impl Sync for WebSocketConnector
impl Unpin for WebSocketConnector
impl !UnwindSafe for WebSocketConnector
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