pub struct Frame<T> { /* private fields */ }
Expand description

A frame of any kind related to an HTTP stream (body).

Implementations

Create a DATA frame with the provided Buf.

Create a trailers frame.

Returns whether this is a DATA frame.

Consumes self into the buf of the DATA frame.

Check Frame::is_data before to determine if the frame is DATA.

If this is a DATA frame, returns a reference to it.

Returns None if not a DATA frame.

If this is a DATA frame, returns a mutable reference to it.

Returns None if not a DATA frame.

Returns whether this is a trailers frame.

Consumes self into the buf of the trailers frame.

Check Frame::is_trailers before to determine if the frame is a trailers frame.

If this is a trailers frame, returns a reference to it.

Returns None if not a trailers frame.

If this is a trailers frame, returns a mutable reference to it.

Returns None if not a trailers frame.

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.

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.