Skip to main content

ChunksExt

Trait ChunksExt 

Source
pub trait ChunksExt<This>
where This: ChunksAlg + Send + 'static, This::Chunk: Send,
{ // Required methods fn moving(self) -> impl Stream<Item = Result<This::Chunk, This::Error>>; fn gathered( self, ) -> impl Future<Output = Result<Vec<This::Chunk>, This::Error>>; }
Expand description

The operations a body stated as chunks derives.

Required Methods§

Source

fn moving(self) -> impl Stream<Item = Result<This::Chunk, This::Error>>

Reads this body as the sequence of chunks it produces.

Nothing is converted and nothing is carried: a chunk stays what the domain said it was, and a failure stays what the domain said it meant. An interpretation states what to make of either, which is the only part of moving bytes that is its own.

Source

fn gathered(self) -> impl Future<Output = Result<Vec<This::Chunk>, This::Error>>

Takes every chunk this body produces, in the order it produces them.

A sequence read whole is what anything states that cannot act on a piece at a time: a part’s content read into a value, or an answer compared against what a caller would have received.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<This> ChunksExt<This> for This
where This: ChunksAlg + Send + 'static, This::Chunk: Send,

The operations a body stated as chunks derives.