pub enum CliError {
Show 14 variants
CommandNotFound {
command: String,
suggestion: String,
},
InvalidArgument {
message: String,
},
Io(Error),
Config(String),
Provider(String),
Generation(String),
Storage(String),
Internal(String),
FileNotFound {
path: String,
},
PermissionDenied {
path: String,
},
InvalidConfigFormat {
details: String,
},
MissingField {
field: String,
},
NetworkError {
details: String,
},
Timeout {
operation: String,
},
}Expand description
CLI-specific errors with enhanced context and suggestions
Variants§
CommandNotFound
InvalidArgument
Io(Error)
Config(String)
Provider(String)
Generation(String)
Storage(String)
Internal(String)
FileNotFound
PermissionDenied
InvalidConfigFormat
MissingField
NetworkError
Timeout
Implementations§
Source§impl CliError
impl CliError
Sourcepub fn user_message(&self) -> String
pub fn user_message(&self) -> String
Get a user-friendly error message with suggestions and documentation links
Sourcepub fn technical_details(&self) -> String
pub fn technical_details(&self) -> String
Get technical details for verbose mode
Sourcepub fn short_message(&self) -> String
pub fn short_message(&self) -> String
Get a short error message (for inline display)
Sourcepub fn suggestions(&self) -> Vec<String>
pub fn suggestions(&self) -> Vec<String>
Get actionable suggestions for this error
Trait Implementations§
Source§impl Error for CliError
impl Error for CliError
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()
Auto Trait Implementations§
impl Freeze for CliError
impl !RefUnwindSafe for CliError
impl Send for CliError
impl Sync for CliError
impl Unpin 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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more