[−][src]Struct hyper::upgrade::Upgraded
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]
self
) -> Result<Parts<T>, Self>
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]
fn poll_read(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &mut ReadBuf<'_>
) -> Poll<Result<()>>[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &mut ReadBuf<'_>
) -> Poll<Result<()>>
impl AsyncWrite for Upgraded[src]
fn poll_write(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &[u8]
) -> Poll<Result<usize>>[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &[u8]
) -> Poll<Result<usize>>
fn poll_write_vectored(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
bufs: &[IoSlice<'_>]
) -> Poll<Result<usize>>[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>,
bufs: &[IoSlice<'_>]
) -> Poll<Result<usize>>
fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>>[src]
fn poll_shutdown(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>>[src]
fn is_write_vectored(&self) -> bool[src]
impl Debug for Upgraded[src]
Auto Trait Implementations
impl !RefUnwindSafe for Upgraded[src]
impl Send for Upgraded[src]
impl !Sync for Upgraded[src]
impl Unpin for Upgraded[src]
impl !UnwindSafe for Upgraded[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T> Instrument for T[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,