Struct ratchet_rs::UpgradedServer
source · [−]pub struct UpgradedServer<S, E> {
pub request: Request<()>,
pub websocket: WebSocket<S, E>,
pub subprotocol: Option<String>,
}
Expand description
A structure representing an upgraded WebSocket session and an optional subprotocol that was negotiated during the upgrade.
Fields
request: Request<()>
The original request that the peer sent.
websocket: WebSocket<S, E>
The WebSocket connection.
subprotocol: Option<String>
An optional subprotocol that was negotiated during the upgrade.
Implementations
sourceimpl<S, E> UpgradedServer<S, E>
impl<S, E> UpgradedServer<S, E>
sourcepub fn into_websocket(self) -> WebSocket<S, E>
pub fn into_websocket(self) -> WebSocket<S, E>
Consume self and take the websocket
Trait Implementations
Auto Trait Implementations
impl<S, E> !RefUnwindSafe for UpgradedServer<S, E>
impl<S, E> Send for UpgradedServer<S, E> where
E: Send,
S: Send,
impl<S, E> Sync for UpgradedServer<S, E> where
E: Sync,
S: Sync,
impl<S, E> Unpin for UpgradedServer<S, E> where
E: Unpin,
S: Unpin,
impl<S, E> !UnwindSafe for UpgradedServer<S, E>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more