pub enum OutputChunk {
Reset {
header: String,
},
Append {
text: String,
spans: Vec<Vec<StyledSpan>>,
},
Finished {
summary: String,
},
}Expand description
One unit of streamed compilation output. The drain applies these in arrival order:
OutputChunk::Resetclears the buffer and seeds a fresh run header (full-range replace).OutputChunk::Appendappends captured stdout/stderr text at the end of the buffer (insert-at-end).OutputChunk::Finishedappends the terminal summary line once the process exits (insert-at-end).
Variants§
Reset
Clear the buffer and seed it with the run header.
Append
Append a batch of captured output lines.
Fields
text: StringThe captured text with every escape sequence already removed (CM.5) — this is what lands in the buffer and what the error parsers were fed.
spans: Vec<Vec<StyledSpan>>CM.5: one entry per line of text, in order, holding that
line’s ANSI colour spans at byte offsets into the clean
line. Empty when the output carried no colour (the common
case: a pipe makes most tools disable it) or when no theme
registry was available to intern the palette.
Travels with the text rather than on a parallel channel for the reason the highlight drain states about diff signs: one thing being spliced cannot desynchronise from itself.
Finished
Append the exit summary line.
Implementations§
Trait Implementations§
Source§impl Clone for OutputChunk
impl Clone for OutputChunk
Source§fn clone(&self) -> OutputChunk
fn clone(&self) -> OutputChunk
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more