[][src]Struct tide::body::Body

pub struct Body { /* fields omitted */ }

The raw contents of an http request or response.

A body is a stream of BodyChunks, which are essentially Vec<u8> values. Both Body and BodyChunk values can be easily created from standard byte buffer types, using the From trait.

Methods

impl Body[src]

pub fn empty() -> Self[src]

Create an empty body.

pub async fn read_to_vec(
    &mut self
) -> impl Future<Output = Result<Vec<u8>, Box<dyn Error + Send + Sync>>> + '_
[src]

Collect the full contents of the body into a vector.

This method is asynchronous because, in general, it requires reading an async stream of BodyChunk values.

Trait Implementations

impl Into<Body> for Body[src]

impl From<Vec<u8>> for Body[src]

impl From<Body> for Body[src]

impl Debug for Body[src]

Auto Trait Implementations

impl Send for Body

impl !Sync for Body

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized
[src]