pub struct CliError { /* private fields */ }Expand description
Typed CLI command failure.
Implementations§
Source§impl CliError
impl CliError
Sourcepub fn usage(code: &'static str, message: impl Into<String>) -> Self
pub fn usage(code: &'static str, message: impl Into<String>) -> Self
Builds a usage-class error.
Sourcepub fn validation(code: &'static str, message: impl Into<String>) -> Self
pub fn validation(code: &'static str, message: impl Into<String>) -> Self
Builds a validation-class error.
Sourcepub fn runtime(code: &'static str, message: impl Into<String>) -> Self
pub fn runtime(code: &'static str, message: impl Into<String>) -> Self
Builds a runtime-class error.
Sourcepub fn connectivity(code: &'static str, message: impl Into<String>) -> Self
pub fn connectivity(code: &'static str, message: impl Into<String>) -> Self
Builds a connectivity-class error.
Trait Implementations§
Source§impl Error for CliError
impl Error for CliError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
impl Eq for CliError
impl StructuralPartialEq for CliError
Auto Trait Implementations§
impl Freeze for CliError
impl RefUnwindSafe for CliError
impl Send for CliError
impl Sync for CliError
impl Unpin for CliError
impl UnsafeUnpin for CliError
impl UnwindSafe for CliError
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