[−][src]Struct tide::body::Body
The raw contents of an http request or response.
A body is a stream of BodyChunk
s, 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]
&mut self
) -> impl Future<Output = Result<Vec<u8>, Box<dyn Error + Send + Sync>>> + '_
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
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
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.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Erased for T
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
[src]
T: Send + Sync + UnwindSafe + ?Sized,