pub struct FatalCliError { /* private fields */ }Expand description
Shared fatal CLI error state.
Implementations§
Source§impl FatalCliError
impl FatalCliError
Sourcepub fn new(
command: impl Into<String>,
json_output: bool,
message: impl Into<String>,
) -> Self
pub fn new( command: impl Into<String>, json_output: bool, message: impl Into<String>, ) -> Self
Create a fatal CLI error with the shared renderer contract.
Sourcepub fn json_output(&self) -> bool
pub fn json_output(&self) -> bool
Return whether the error should emit JSON.
Sourcepub fn emit_and_exit_code(self) -> i32
pub fn emit_and_exit_code(self) -> i32
Emit the fatal error and return the shared failure exit code.
Trait Implementations§
Source§impl Clone for FatalCliError
impl Clone for FatalCliError
Source§fn clone(&self) -> FatalCliError
fn clone(&self) -> FatalCliError
Returns a duplicate of the value. Read more
1.0.0 · 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 FatalCliError
impl Debug for FatalCliError
Source§impl PartialEq for FatalCliError
impl PartialEq for FatalCliError
impl Eq for FatalCliError
impl StructuralPartialEq for FatalCliError
Auto Trait Implementations§
impl Freeze for FatalCliError
impl RefUnwindSafe for FatalCliError
impl Send for FatalCliError
impl Sync for FatalCliError
impl Unpin for FatalCliError
impl UnsafeUnpin for FatalCliError
impl UnwindSafe for FatalCliError
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