pub trait WebSocketClientExt:
Clone
+ WasmCompatSend
+ WasmCompatSync
+ 'static {
// Required method
fn connect(
&self,
request: Request<NoBody>,
options: ConnectOptions,
) -> impl Future<Output = Result<Box<dyn WebSocketConnection>, Error>> + WasmCompatSend;
}Available on crate feature
websocket only.Expand description
Opens websocket connections from requests with WS(S) URIs and authentication
headers. Backends supply websocket handshake headers such as
Sec-WebSocket-Key; callers must not supply those headers.
Required Methods§
Sourcefn connect(
&self,
request: Request<NoBody>,
options: ConnectOptions,
) -> impl Future<Output = Result<Box<dyn WebSocketConnection>, Error>> + WasmCompatSend
fn connect( &self, request: Request<NoBody>, options: ConnectOptions, ) -> impl Future<Output = Result<Box<dyn WebSocketConnection>, Error>> + WasmCompatSend
Opens a connection, preserving rejected upgrades with their HTTP status, headers, and response body.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl WebSocketClientExt for TungsteniteClient
Available on non-target_family=wasm only.
impl WebSocketClientExt for TungsteniteClient
Available on non-
target_family=wasm only.