pub trait Upgrade: Sized {
// Required method
fn upgrade(self) -> Upgraded<Self>;
}Expand description
Extension trait for requests builders that can be upgraded to a websocket connection.
This is automatically implemented for anything that implements our RequestBuilder trait.
Required Methods§
Sourcefn upgrade(self) -> Upgraded<Self>
fn upgrade(self) -> Upgraded<Self>
Upgrades the RequestBuilder to perform a WebSocket handshake.
This returns a wrapped type, so you must do this after you set up your request, and just before sending the request.
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.