pub struct Upgraded<R> { /* private fields */ }Expand description
Wrapper for a reqwest::RequestBuilder that performs the
WebSocket handshake when sent.
Implementations§
Source§impl<R> Upgraded<R>where
R: RequestBuilder,
impl<R> Upgraded<R>where
R: RequestBuilder,
Sourcepub fn protocols<S: Into<String>>(
self,
protocols: impl IntoIterator<Item = S>,
) -> Self
pub fn protocols<S: Into<String>>( self, protocols: impl IntoIterator<Item = S>, ) -> Self
Selects which sub-protocols are accepted by the client.
Sourcepub fn web_socket_config(self, config: WebSocketConfig) -> Self
Available on non-WebAssembly only.
pub fn web_socket_config(self, config: WebSocketConfig) -> Self
Sets the WebSocket configuration.
Sourcepub async fn send(self) -> Result<UpgradeResponse, Error>
pub async fn send(self) -> Result<UpgradeResponse, Error>
Sends the request and returns an UpgradeResponse.
Auto Trait Implementations§
impl<R> Freeze for Upgraded<R>where
R: Freeze,
impl<R> RefUnwindSafe for Upgraded<R>where
R: RefUnwindSafe,
impl<R> Send for Upgraded<R>where
R: Send,
impl<R> Sync for Upgraded<R>where
R: Sync,
impl<R> Unpin for Upgraded<R>where
R: Unpin,
impl<R> UnwindSafe for Upgraded<R>where
R: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more