Struct fire_http::Body

source ·
pub struct Body { /* private fields */ }

Implementations

Creates a new empty Body.

Creates a new Body from the given bytes.

Creates a new Body from the given bytes.

Creates a new Body from a hyper::Body.

Creates a new Body from a Read implementation.

Creates a new Body from an AsyncRead implementation.

Creates a new Body from a Stream<Item=io::Result<Bytes>> implementation.

Creates a new Body from a serializeable object.

Returns true if we know the body is empty, the body still might be empty but we just don’t know it yet

Returns a length if it is already known.

Sets a read size limit.

Sets a read timeout, the timer starts counting after you call into_*

Takes the body and replaces it with an empty one.

Converts the Body into Bytes.

Converts the Body into a string.

Converts the Body into a type that implements Read.

Converts the Body into a type that implements AsyncRead.

Converts the Body into a type that implements Stream<Item=io::Result<Bytes>>.

Converts the Body into a type that implements hyper::body::Body.

Converts the Body into a deserializeable type.

Trait Implementations

Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.

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

Calls U::from(self).

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

Should always be Self
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