pub trait BodyStream: Send {
// Required method
fn next_chunk(&mut self) -> Option<Vec<u8>>;
}Expand description
Enables streaming response bodies to support large data transfers without high memory overhead. This is crucial for keeping memory usage low in a zero-dep environment.
Required Methods§
Sourcefn next_chunk(&mut self) -> Option<Vec<u8>>
fn next_chunk(&mut self) -> Option<Vec<u8>>
Returns the next chunk of bytes. Returns None when the stream is exhausted.