pub async fn new(
            url: Url,
            config: Option<WebSocketConfig>,
        ) -> Result<(Self, WebSocketClientDriver), Error> {
            let url = url.to_string();
            debug!("Connecting to unsecure WebSocket endpoint: {}", url);

            let (stream, _response) = connect_async_with_config(url, config)
                .await
                .map_err(Error::tungstenite)?;

            let (cmd_tx, cmd_rx) = unbounded();
            let driver = WebSocketClientDriver::new(stream, cmd_rx);
            let client = Self {
                cmd_tx,
                _client_type: Default::default(),
            };

            Ok((client, driver))
        }
/// Construct a WebSocket client. Immediately attempts to open a WebSocket
/// connection to the node with the given address.
///
/// On success, this returns both a client handle (a `WebSocketClient`
/// instance) as well as the WebSocket connection driver. The execution of
/// this driver becomes the responsibility of the client owner, and must be
/// executed in a separate asynchronous context to the client to ensure it
/// doesn't block the client.
Construct a WebSocket client. Immediately attempts to open a WebSocket
connection to the node with the given address.

On success, this returns both a client handle (a `WebSocketClient`
instance) as well as the WebSocket connection driver. The execution of
this driver becomes the responsibility of the client owner, and must be
executed in a separate asynchronous context to the client to ensure it
doesn't block the client.
Construct a WebSocket client . Immediately attempts to open a WebSocket connection to the node with the given address . On success this returns both a client handle ( a ` WebSocketClient ` instance ) as well as the WebSocket connection driver . The execution of this driver becomes the responsibility of the client owner and must be executed in a separate asynchronous context to the client to ensure it doesn ' t block the client .
pub async fn new(
            url: Url,
            config: Option<WebSocketConfig>,
        ) -> Result<(Self, WebSocketClientDriver), Error> {
            let url = url.to_string();
            debug!("Connecting to unsecure WebSocket endpoint: {}", url);
            let (stream, _response) = connect_async_with_config(url, config)
                .await
                .map_err(Error::tungstenite)?;
            let (cmd_tx, cmd_rx) = unbounded();
            let driver = WebSocketClientDriver::new(stream, cmd_rx);
            let client = Self {
                cmd_tx,
                _client_type: Default::default(),
            };
            Ok((client, driver))
        }
pub async fn new ( url : Url , config : Option < WebSocketConfig > , ) -> Result < ( Self , WebSocketClientDriver ) , Error > { let url = url . to_string ( ) ; debug ! ( " " url ) ; let ( stream , _response ) = connect_async_with_config ( url , config ) . await . map_err ( Error :: tungstenite ) ? ; let ( cmd_tx , cmd_rx ) = unbounded ( ) ; let driver = WebSocketClientDriver :: new ( stream , cmd_rx ) ; let client = Self { cmd_tx , _client_type : Default :: default ( ) , } ; Ok ( ( client , driver ) ) }
Construct a WebSocket client.
Construct a WebSocket client .
url
Url
config
Option<WebSocketConfig>