Skip to main content

BodyReader

Trait BodyReader 

Source
pub trait BodyReader {
    // Required method
    fn next_chunk(&mut self, scope: &RequestScope) -> Result<Option<Vec<u8>>>;
}
Expand description

Pull-based bounded request body. A chunk is consumed before another can be requested.

Required Methods§

Source

fn next_chunk(&mut self, scope: &RequestScope) -> Result<Option<Vec<u8>>>

Returns the next non-empty chunk, or None at the message boundary.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§