Struct Upgraded
pub struct Upgraded { /* private fields */ }
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
fn downcast<T: Read + Write + Unpin + 'static>(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
Upgradedback.
Trait Implementations
impl Debug for Upgraded
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Read for Upgraded
fn poll_read(self: Pin<&mut Self>, cx: &mut Context<'_>, buf: ReadBufCursor<'_>) -> Poll<Result<()>>
impl Write for Upgraded
fn poll_write(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>>fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>>fn poll_shutdown(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>>fn is_write_vectored(&self) -> bool
Auto Trait Implementations
impl !Freeze for Upgraded
impl !RefUnwindSafe for Upgraded
impl !Sync for Upgraded
impl !UnwindSafe for Upgraded
impl Send for Upgraded
impl Unpin for Upgraded
impl UnsafeUnpin for Upgraded
Blanket Implementations
impl<T> Any for Upgraded
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for Upgraded
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for Upgraded
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> From<T> for Upgraded
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Instrument for Upgraded
impl<T> WithSubscriber for Upgraded
impl<T, U> Into<U> for Upgraded
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for Upgraded
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for Upgraded
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>