Trait Body

Source
pub trait Body: Debug
where Self: Sized,
{ type Error: Error + 'static; // Required methods fn content_len(&self) -> Option<u64>; fn eof(&self) -> bool; async fn next_chunk(&mut self) -> Result<BodyChunk, Self::Error>; }

Required Associated Types§

Source

type Error: Error + 'static

Required Methods§

Source

fn content_len(&self) -> Option<u64>

Source

fn eof(&self) -> bool

Source

async fn next_chunk(&mut self) -> Result<BodyChunk, Self::Error>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Body for ()

Source§

type Error = NeverError

Source§

fn content_len(&self) -> Option<u64>

Source§

fn eof(&self) -> bool

Source§

async fn next_chunk(&mut self) -> Result<BodyChunk, Self::Error>

Implementors§