Skip to main content

WsConnector

Trait WsConnector 

Source
pub trait WsConnector: Send + Sync {
    type Conn: WsConn;

    // Required method
    fn connect(
        &self,
        url: &str,
    ) -> impl Future<Output = Result<Self::Conn, WsError>> + Send;
}
Expand description

Creates WebSocket connections for an OKX WebSocket endpoint URL.

Required Associated Types§

Source

type Conn: WsConn

The connection type returned by this connector.

Required Methods§

Source

fn connect( &self, url: &str, ) -> impl Future<Output = Result<Self::Conn, WsError>> + Send

Connect to a WebSocket URL.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§