pub enum OutputTo {
Split,
Stdout,
Stderr,
}Expand description
Where a CliEmitter sends its events, selected by --output-to.
The stream an event lands on follows the program’s consumption mode, not the event’s shape (see the spec’s CLI Event Framing):
OutputTo::Split(the default) is finite one-shot mode:resultgoes tostdout, whileerror/progress/loggo tostderr.stdouttherefore carries only successful payloads, so a shell capture or pipe never mistakes a failure for data.OutputTo::Stdout/OutputTo::Stderrare event-stream mode: every event, includingerror, is collapsed onto that one stream so a consumer reading it in order (kind-branching) sees preserved ordering.
A command is an event stream when it produces more than one caller-needed
output over time — a chunked payload, or an address the caller must act on
before the command can report its outcome. Such a command defaults to
OutputTo::Stdout and rejects an explicit split, because splitting it
would strand the caller’s data on the diagnostic stream. If a
kind:"progress" event carries a payload the caller must read, the command
is an event stream that has not declared itself.
Variants§
Split
Finite one-shot: result → stdout, error/progress/log → stderr.
Stdout
Event stream: every event onto stdout.
Stderr
Event stream: every event onto stderr.
Implementations§
Trait Implementations§
impl Copy for OutputTo
impl Eq for OutputTo
impl StructuralPartialEq for OutputTo
Auto Trait Implementations§
impl Freeze for OutputTo
impl RefUnwindSafe for OutputTo
impl Send for OutputTo
impl Sync for OutputTo
impl Unpin for OutputTo
impl UnsafeUnpin for OutputTo
impl UnwindSafe for OutputTo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.