pub struct UpgradedRequestBuilder { /* private fields */ }
Expand description
Wrapper for a reqwest::RequestBuilder
that performs the
WebSocket
handshake when sent.
Implementations§
Source§impl UpgradedRequestBuilder
impl UpgradedRequestBuilder
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
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 !Freeze for UpgradedRequestBuilder
impl !RefUnwindSafe for UpgradedRequestBuilder
impl Send for UpgradedRequestBuilder
impl Sync for UpgradedRequestBuilder
impl Unpin for UpgradedRequestBuilder
impl !UnwindSafe for UpgradedRequestBuilder
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