pub enum Event {
Message(String),
Detail(String),
Artifact(Box<dyn Artifact>),
}Expand description
Structured output event produced by commands
An Event represents a single piece of output that a command has produced. Events travel from
the producer through an async channel to the Presenter, decoupling production from rendering.
Three variants:
Message— informational text (shown at default verbosity and above).Detail— supplementary text (shown only at verbose verbosity).Event::Artifact— the primary data a command produces, carried as a trait object that the Presenter can render viaDisplayorSerialize.
The Presenter decides which events to render based on its verbosity setting.
Variants§
Message(String)
Informational message
Detail(String)
Supplementary detail
Artifact(Box<dyn Artifact>)
Primary command output
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Event
impl !UnwindSafe for Event
impl Freeze for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
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