[−][src]Struct websocket::server::upgrade::sync::RequestStreamPair
If you have your requests separate from your stream you can use this struct to upgrade the connection based on the request given (the request should be a handshake).
Trait Implementations
impl<S> IntoWs for RequestStreamPair<S> where
S: Stream, [src]
impl<S> IntoWs for RequestStreamPair<S> where
S: Stream, type Stream = S
The type of stream this upgrade process is working with (TcpStream, etc.)
type Error = (S, Request, HyperIntoWsError)
An error value in case the stream is not asking for a websocket connection or something went wrong. It is common to also include the stream here. Read more
fn into_ws(self) -> Result<Upgrade<Self::Stream>, Self::Error>[src]
fn into_ws(self) -> Result<Upgrade<Self::Stream>, Self::Error>Attempt to parse the start of a Websocket handshake, later with the returned WsUpgrade struct, call accept to start a websocket client, and reject to send a handshake rejection response. Read more
Auto Trait Implementations
impl<S> Send for RequestStreamPair<S> where
S: Send,
impl<S> Send for RequestStreamPair<S> where
S: Send, impl<S> !Sync for RequestStreamPair<S>
impl<S> !Sync for RequestStreamPair<S>Blanket Implementations
impl<S> IntoWs for S where
S: Stream, [src]
impl<S> IntoWs for S where
S: Stream, type Stream = S
The type of stream this upgrade process is working with (TcpStream, etc.)
type Error = (S, Option<Incoming<(Method, RequestUri)>>, Option<Buffer>, HyperIntoWsError)
An error value in case the stream is not asking for a websocket connection or something went wrong. It is common to also include the stream here. Read more
fn into_ws(
Self
) -> Result<WsUpgrade<<S as IntoWs>::Stream, Option<Buffer>>, <S as IntoWs>::Error>[src]
fn into_ws(
Self
) -> Result<WsUpgrade<<S as IntoWs>::Stream, Option<Buffer>>, <S as IntoWs>::Error>Attempt to parse the start of a Websocket handshake, later with the returned WsUpgrade struct, call accept to start a websocket client, and reject to send a handshake rejection response. Read more
impl<T, U> Into for T where
U: From<T>, [src]
impl<T, U> Into for T where
U: From<T>, impl<T> From for T[src]
impl<T> From for Timpl<T, U> TryFrom for T where
T: From<U>, [src]
impl<T, U> TryFrom for T where
T: From<U>, type Error = !
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>try_from)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized, [src]
impl<T> Borrow for T where
T: ?Sized, impl<T> BorrowMut for T where
T: ?Sized, [src]
impl<T> BorrowMut for T where
T: ?Sized, fn borrow_mut(&mut self) -> &mut T[src]
fn borrow_mut(&mut self) -> &mut TMutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
impl<T, U> TryInto for T where
U: TryFrom<T>, type Error = <U as TryFrom<T>>::Error
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>try_from)Performs the conversion.
impl<T> Any for T where
T: 'static + ?Sized, [src]
impl<T> Any for T where
T: 'static + ?Sized, fn get_type_id(&self) -> TypeId[src]
fn get_type_id(&self) -> TypeId🔬 This is a nightly-only experimental API. (get_type_id)
this method will likely be replaced by an associated static
Gets the TypeId of self. Read more
impl<T> Typeable for T where
T: Any, [src]
impl<T> Typeable for T where
T: Any, impl<T> Erased for T[src]
impl<T> Erased for T