Trait HttpClientWebSocketExt
pub trait HttpClientWebSocketExt:
Sized
+ HttpClientWebSocketExtSealed
+ Send
+ Sync
+ 'static {
// Required methods
fn websocket(
&self,
url: impl IntoUrl,
) -> WebSocketRequestBuilder<WithService<RQBorrowedService<'_, Self>>>;
fn into_websocket(
self,
url: impl IntoUrl,
) -> WebSocketRequestBuilder<WithService<RQOwnedService<Self>>>;
fn websocket_h2(
&self,
url: impl IntoUrl,
) -> WebSocketRequestBuilder<WithService<RQBorrowedService<'_, Self>>>;
fn into_websocket_h2(
self,
url: impl IntoUrl,
) -> WebSocketRequestBuilder<WithService<RQOwnedService<Self>>>;
fn websocket_with_request<RequestBody>(
&self,
req: Request<RequestBody>,
) -> WebSocketRequestBuilder<WithService<RQBorrowedService<'_, Self>>>
where RequestBody: Into<Body>;
fn into_websocket_with_request<RequestBody>(
self,
req: Request<RequestBody>,
) -> WebSocketRequestBuilder<WithService<RQOwnedService<Self>>>
where RequestBody: Into<Body>;
}Expand description
Extends an Http Client with high level features WebSocket features.
Required Methods§
fn websocket(
&self,
url: impl IntoUrl,
) -> WebSocketRequestBuilder<WithService<RQBorrowedService<'_, Self>>>
fn websocket( &self, url: impl IntoUrl, ) -> WebSocketRequestBuilder<WithService<RQBorrowedService<'_, Self>>>
Create a new WebSocketRequestBuilder] to be used to establish a WebSocket connection over http/1.1.
fn into_websocket(
self,
url: impl IntoUrl,
) -> WebSocketRequestBuilder<WithService<RQOwnedService<Self>>>
fn into_websocket( self, url: impl IntoUrl, ) -> WebSocketRequestBuilder<WithService<RQOwnedService<Self>>>
Create a new WebSocketRequestBuilder] to be used to establish a WebSocket connection over http/1.1.
fn websocket_h2(
&self,
url: impl IntoUrl,
) -> WebSocketRequestBuilder<WithService<RQBorrowedService<'_, Self>>>
fn websocket_h2( &self, url: impl IntoUrl, ) -> WebSocketRequestBuilder<WithService<RQBorrowedService<'_, Self>>>
Create a new WebSocketRequestBuilder to be used to establish a WebSocket connection over h2.
fn into_websocket_h2(
self,
url: impl IntoUrl,
) -> WebSocketRequestBuilder<WithService<RQOwnedService<Self>>>
fn into_websocket_h2( self, url: impl IntoUrl, ) -> WebSocketRequestBuilder<WithService<RQOwnedService<Self>>>
Create a new WebSocketRequestBuilder to be used to establish a WebSocket connection over h2.
fn websocket_with_request<RequestBody>(
&self,
req: Request<RequestBody>,
) -> WebSocketRequestBuilder<WithService<RQBorrowedService<'_, Self>>>
fn websocket_with_request<RequestBody>( &self, req: Request<RequestBody>, ) -> WebSocketRequestBuilder<WithService<RQBorrowedService<'_, Self>>>
Create a new WebSocketRequestBuilder starting from the given request.
This is useful in cases where you already have a request that you wish to use, for example in the case of a proxied reuqest.
fn into_websocket_with_request<RequestBody>(
self,
req: Request<RequestBody>,
) -> WebSocketRequestBuilder<WithService<RQOwnedService<Self>>>
fn into_websocket_with_request<RequestBody>( self, req: Request<RequestBody>, ) -> WebSocketRequestBuilder<WithService<RQOwnedService<Self>>>
Create a new WebSocketRequestBuilder starting from the given request.
This is useful in cases where you already have a request that you wish to use, for example in the case of a proxied reuqest.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.