Struct hyper::upgrade::Upgraded[][src]

pub struct Upgraded { /* fields omitted */ }

An upgraded HTTP connection.

This type holds a trait object internally of the original IO that was used to speak HTTP before the upgrade. It can be used directly as a Read or Write for convenience.

Alternatively, if the exact type is known, this can be deconstructed into its parts.

Implementations

impl Upgraded[src]

pub fn downcast<T: AsyncRead + AsyncWrite + Unpin + 'static>(
    self
) -> Result<Parts<T>, Self>
[src]

Tries to downcast the internal trait object to the type passed.

On success, returns the downcasted parts. On error, returns the Upgraded back.

Trait Implementations

impl AsyncRead for Upgraded[src]

impl AsyncWrite for Upgraded[src]

impl Debug for Upgraded[src]

Auto Trait Implementations

impl !RefUnwindSafe for Upgraded

impl Send for Upgraded

impl !Sync for Upgraded

impl Unpin for Upgraded

impl !UnwindSafe for Upgraded

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<R> AsyncReadExt for R where
    R: AsyncRead + ?Sized
[src]

impl<W> AsyncWriteExt for W where
    W: AsyncWrite + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.