pub struct WsUpgradeRequest<IO: AsyncRead + AsyncWrite + Unpin> { /* private fields */ }

Implementations§

source§

impl<IO: AsyncRead + AsyncWrite + Unpin> WsUpgradeRequest<IO>

source

pub fn into_inner(self) -> Request<IO>

Direct access to the request as http::Request and underlying transport. The transport may be extracted using

let transport = request.into_inner();
source

pub fn request_headers(&self) -> &HeaderMap

Access the original requests headers as http::HeaderMap.

source

pub fn uri(&self) -> &Uri

Access the original requests URI as http::Uri.

source

pub fn method(&self) -> Method

Return the original requests method as http::Method.

source

pub fn version(&self) -> Version

Return the HTTP version as http::Version.

source

pub fn upgrade(self) -> WsAccept<IO>

Upgrade to a websocket connection.

Trait Implementations§

source§

impl<IO: AsyncRead + AsyncWrite + Unpin + IsTls> IsTls for WsUpgradeRequest<IO>

source§

fn is_tls(&self) -> bool

Auto Trait Implementations§

§

impl<IO> RefUnwindSafe for WsUpgradeRequest<IO>where IO: RefUnwindSafe,

§

impl<IO> Send for WsUpgradeRequest<IO>where IO: Send,

§

impl<IO> Sync for WsUpgradeRequest<IO>where IO: Sync,

§

impl<IO> Unpin for WsUpgradeRequest<IO>

§

impl<IO> UnwindSafe for WsUpgradeRequest<IO>where IO: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T> AsTaggedExplicit<'a> for Twhere T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self>

§

impl<'a, T> AsTaggedImplicit<'a> for Twhere T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32 ) -> TaggedParser<'a, Implicit, Self>

source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V