pub struct Output {
pub format: Format,
}Fields§
§format: FormatImplementations§
Source§impl Output
impl Output
pub fn new(json: bool) -> Self
pub fn is_json(&self) -> bool
Sourcepub fn warn(&self, text: impl AsRef<str>)
pub fn warn(&self, text: impl AsRef<str>)
A warning on stderr (both modes, so it never corrupts --json stdout).
Sourcepub fn emit_error(&self, err: &Error) -> i32
pub fn emit_error(&self, err: &Error) -> i32
Emit an error to stderr in the active format and return its exit code.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Output
impl RefUnwindSafe for Output
impl Send for Output
impl Sync for Output
impl Unpin for Output
impl UnsafeUnpin for Output
impl UnwindSafe for Output
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