pub enum ChunkResult<Chunk, State> {
    Continue(Option<Chunk>, State),
    Yield(Option<Chunk>, State, Chunk),
}
Expand description

The return value of chunker functions used with apply_chunker.

Variants

Continue(Option<Chunk>, State)

Tuple Fields

0: Option<Chunk>

The updated chunk value to be passed to the next iteration.

1: State

The updated state value to be passed to the next iteration.

Indicates that apply_chunker should continue to the next input stream value without yielding a chunk.

Yield(Option<Chunk>, State, Chunk)

Tuple Fields

0: Option<Chunk>

The updated chunk value to be passed to the next iteration.

1: State

The updated state value to be passed to the next iteration.

2: Chunk

The chunk to be yielded to the output stream.

Indicates that apply_chunker should yield a chunk and then continue to the next input stream value.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.