pub trait ChunksAlg {
type Chunk;
type Error;
// Required method
fn next_chunk(
&mut self,
) -> impl Future<Output = Option<Result<Self::Chunk, Self::Error>>> + Send;
}Expand description
States a body produced over time: the chunks it carries, and what taking the next one means.
A domain answering with a body it cannot hold all at once states this rather than naming a stream type. What a chunk is, what a failure part-way through means, and how bytes actually move are then the interpretation’s to choose, which is the whole reason a program states a surface rather than a framework’s callbacks.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".