pub struct OutputChunk {
pub stream: OutputStream,
pub bytes: Vec<u8>,
}Expand description
A piece of output, tagged with where it came from.
One stream rather than two, because a remote provider has one channel and splitting it would make ordering a provider’s problem to reinvent. A consumer that wants the two separated accumulates two buffers; a consumer that wants them interleaved already has them in order.
Bytes rather than lines: line splitting is a consumer’s concern, and a provider that split for them would be deciding what a line is on output that may not have any.
Fields§
§stream: OutputStream§bytes: Vec<u8>Trait Implementations§
Source§impl Clone for OutputChunk
impl Clone for OutputChunk
Source§impl Debug for OutputChunk
impl Debug for OutputChunk
impl Eq for OutputChunk
Source§impl PartialEq for OutputChunk
impl PartialEq for OutputChunk
impl StructuralPartialEq for OutputChunk
Auto Trait Implementations§
impl Forget for OutputChunk
impl Freeze for OutputChunk
impl Move for OutputChunk
impl RefUnwindSafe for OutputChunk
impl Send for OutputChunk
impl Sync for OutputChunk
impl Unpin for OutputChunk
impl UnsafeUnpin for OutputChunk
impl UnwindSafe for OutputChunk
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