pub struct Parts<T, S> {
    pub io: T,
    pub read_buf: Bytes,
    pub service: S,
    /* private fields */
}
Expand description

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: T

The original IO object used in the handshake.

read_buf: Bytes

A buffer of bytes that have been read but not processed as HTTP.

If the client sent additional bytes after its last request, and this connection “ended” with an upgrade, the read buffer will contain those bytes.

You will want to check for any existing bytes if you plan to continue communicating on the IO object.

service: S

The Service used to serve this connection.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more