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>,
output: JsonOutput,
message: impl Into<String>,
) -> Self
pub fn new( command: impl Into<String>, output: JsonOutput, message: impl Into<String>, ) -> Self
Create a fatal CLI error with the shared renderer contract.
Sourcepub const fn output(&self) -> JsonOutput
pub const fn output(&self) -> JsonOutput
Return the output mode used for shared error rendering.
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 (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 FatalCliError
impl Debug for FatalCliError
impl Eq for FatalCliError
Source§impl PartialEq for FatalCliError
impl PartialEq for FatalCliError
Source§fn eq(&self, other: &FatalCliError) -> bool
fn eq(&self, other: &FatalCliError) -> bool
Tests for
self and other values to be equal, and is used by ==.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