Struct Parts
struct Parts<T> { ... }
Deconstructed parts of a Connection.
This allows taking apart a Connection at a later time, in order to
reclaim the IO object, and additional related pieces.
Fields
io: TThe original IO object used in the handshake.
read_buf: bytes::BytesA buffer of bytes that have been read but not processed as HTTP.
For instance, if the
Connectionis used for an HTTP upgrade request, it is possible the server sent back the first bytes of the new protocol along with the response upgrade.You will want to check for any existing bytes if you plan to continue communicating on the IO object.
Implementations
impl<T> Any for Parts<T>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for Parts<T>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for Parts<T>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> Freeze for Parts<T>
impl<T> From for Parts<T>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Instrument for Parts<T>
impl<T> RefUnwindSafe for Parts<T>
impl<T> Send for Parts<T>
impl<T> Sync for Parts<T>
impl<T> Unpin for Parts<T>
impl<T> UnwindSafe for Parts<T>
impl<T> WithSubscriber for Parts<T>
impl<T, U> Into for Parts<T>
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for Parts<T>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for Parts<T>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>
impl<T: $crate::fmt::Debug> Debug for Parts<T>
fn fmt(self: &Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result