Enum conduit::Body[][src]

pub enum Body {
    Static(&'static [u8]),
    Owned(Vec<u8>),
    File(File),
}
Expand description

A type representing a Response body.

This type is intended exclusively for use as part of a Response<Body>. Each conduit server provides its own request type that implements RequestExt which provides the request body as a &'a mut dyn Read.

Variants

Tuple Fields of Static

0: &'static [u8]
Owned(Vec<u8>)

Tuple Fields of Owned

0: Vec<u8>
File(File)

Tuple Fields of File

0: File

Implementations

Create a new Body from an empty static slice.

Create a new Body from the provided static byte slice.

Create a new Body by taking ownership of the provided bytes.

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

Performs the conversion.

Performs the conversion.

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.