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)
Indicates that apply_chunker
should continue to the next input stream value without yielding a chunk.
Tuple Fields
§
1: State
The updated state value to be passed to the next iteration.
Yield(Option<Chunk>, State, Chunk)
Indicates that apply_chunker
should yield a chunk and then continue to the next input stream value.
Auto Trait Implementations§
impl<Chunk, State> Freeze for ChunkResult<Chunk, State>
impl<Chunk, State> RefUnwindSafe for ChunkResult<Chunk, State>where
State: RefUnwindSafe,
Chunk: RefUnwindSafe,
impl<Chunk, State> Send for ChunkResult<Chunk, State>
impl<Chunk, State> Sync for ChunkResult<Chunk, State>
impl<Chunk, State> Unpin for ChunkResult<Chunk, State>
impl<Chunk, State> UnwindSafe for ChunkResult<Chunk, State>where
State: UnwindSafe,
Chunk: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more