#[non_exhaustive]pub struct UpgradeResponseParts<E> {
pub response: Response<()>,
pub subprotocol: Option<String>,
pub extension: Option<E>,
}Expand description
A negotiated WebSocket response and its configured subprotcol and extension, if any.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.response: Response<()>An http::Response<()>, which represents the WebSocket handshake response.
subprotocol: Option<String>The optional WebSocket subprotocol agreed upon during the handshake.
The subprotocol is used to define the application-specific communication on top of the
WebSocket connection, such as wamp or graphql-ws. If no subprotocol is requested or
agreed upon, this will be None.
extension: Option<E>The optional WebSocket extension negotiated during the handshake.
Extensions allow WebSocket connections to have additional functionality, such as compression
or multiplexing. This field represents any such negotiated extension, or None if no
extensions were negotiated.
Trait Implementations§
Auto Trait Implementations§
impl<E> !RefUnwindSafe for UpgradeResponseParts<E>
impl<E> !UnwindSafe for UpgradeResponseParts<E>
impl<E> Freeze for UpgradeResponseParts<E>where
E: Freeze,
impl<E> Send for UpgradeResponseParts<E>where
E: Send,
impl<E> Sync for UpgradeResponseParts<E>where
E: Sync,
impl<E> Unpin for UpgradeResponseParts<E>where
E: Unpin,
impl<E> UnsafeUnpin for UpgradeResponseParts<E>where
E: UnsafeUnpin,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more