#[non_exhaustive]pub enum OutputEvent {
Stdout(OutputLine),
Stderr(OutputLine),
}Expand description
An event produced by a child process: a decoded line from stdout or stderr.
Yielded by RunningProcess::output_events, which merges both streams into
a single, ordered sequence.
Non-exhaustive: a future release may add a third kind of event (e.g. a
lifecycle marker) without a breaking change, so a match on OutputEvent
needs a _ arm. Each per-stream line is an OutputLine (rather than a bare
String) so per-line metadata can be attached there without a breaking change
either.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Stdout(OutputLine)
A line from the child’s standard output.
Stderr(OutputLine)
A line from the child’s standard error.
Implementations§
Trait Implementations§
Source§impl Clone for OutputEvent
impl Clone for OutputEvent
Source§fn clone(&self) -> OutputEvent
fn clone(&self) -> OutputEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OutputEvent
impl Debug for OutputEvent
impl Eq for OutputEvent
Source§impl PartialEq for OutputEvent
impl PartialEq for OutputEvent
Source§fn eq(&self, other: &OutputEvent) -> bool
fn eq(&self, other: &OutputEvent) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for OutputEvent
Auto Trait Implementations§
impl Freeze for OutputEvent
impl RefUnwindSafe for OutputEvent
impl Send for OutputEvent
impl Sync for OutputEvent
impl Unpin for OutputEvent
impl UnsafeUnpin for OutputEvent
impl UnwindSafe for OutputEvent
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