Enum cobalt_async::ChunkResult
source · [−]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.
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.
Indicates that apply_chunker
should yield a chunk and then continue to the next input stream value.
Auto Trait Implementations
impl<Chunk, State> RefUnwindSafe for ChunkResult<Chunk, State> where
Chunk: RefUnwindSafe,
State: RefUnwindSafe,
impl<Chunk, State> Send for ChunkResult<Chunk, State> where
Chunk: Send,
State: Send,
impl<Chunk, State> Sync for ChunkResult<Chunk, State> where
Chunk: Sync,
State: Sync,
impl<Chunk, State> Unpin for ChunkResult<Chunk, State> where
Chunk: Unpin,
State: Unpin,
impl<Chunk, State> UnwindSafe for ChunkResult<Chunk, State> where
Chunk: UnwindSafe,
State: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more