pub enum CliCoreError {
MissingAuthProvider(String),
AuthProvider {
provider: String,
source: Box<dyn Error + Send + Sync>,
},
InvalidOutputFormat(String),
Message(String),
SystemMessage {
message: String,
system: String,
code: String,
request_id: String,
},
System {
system: String,
source: Box<dyn Error + Send + Sync>,
},
Detailed {
code: String,
system: String,
request_id: String,
source: Box<dyn Error + Send + Sync>,
},
ExitCode {
code: i32,
source: Box<dyn Error + Send + Sync>,
},
Io(Error),
Json(Error),
Transport(Error),
}Expand description
Framework error type.
Variants§
MissingAuthProvider(String)
Requested auth provider has not been registered.
AuthProvider
Auth provider failed.
InvalidOutputFormat(String)
Output format is not supported.
Message(String)
Plain message error.
SystemMessage
Structured message with explicit envelope metadata.
Fields
System
Wrapped source error with backend/system attribution.
Detailed
Wrapped source error with structured metadata captured up front.
Fields
ExitCode
Wrapped source error with explicit process exit code.
Io(Error)
IO error.
Json(Error)
JSON serialization or decoding error.
Transport(Error)
Structured HTTP transport error.
Implementations§
Source§impl CliCoreError
impl CliCoreError
Sourcepub fn message_for_system(
system: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn message_for_system( system: impl Into<String>, message: impl Into<String>, ) -> Self
Creates a structured message attributed to a backend/system id.
Sourcepub fn with_system(
system: impl Into<String>,
source: impl Error + Send + Sync + 'static,
) -> Self
pub fn with_system( system: impl Into<String>, source: impl Error + Send + Sync + 'static, ) -> Self
Wraps a source error with backend/system attribution.
Sourcepub fn with_exit_code(
code: i32,
source: impl Error + Send + Sync + 'static,
) -> Self
pub fn with_exit_code( code: i32, source: impl Error + Send + Sync + 'static, ) -> Self
Wraps a source error with an explicit process exit code.
Sourcepub fn with_detailed_error(
source: impl DetailedError + Send + Sync + 'static,
) -> Self
pub fn with_detailed_error( source: impl DetailedError + Send + Sync + 'static, ) -> Self
Captures structured metadata from a detailed source error.
Trait Implementations§
Source§impl Debug for CliCoreError
impl Debug for CliCoreError
Source§impl Display for CliCoreError
impl Display for CliCoreError
Source§impl Error for CliCoreError
impl Error for CliCoreError
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()
Source§impl ExitCoder for CliCoreError
impl ExitCoder for CliCoreError
Source§impl From<CliCoreError> for Value
impl From<CliCoreError> for Value
Source§fn from(error: CliCoreError) -> Self
fn from(error: CliCoreError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for CliCoreError
impl From<Error> for CliCoreError
Source§impl From<Error> for CliCoreError
impl From<Error> for CliCoreError
Auto Trait Implementations§
impl Freeze for CliCoreError
impl !RefUnwindSafe for CliCoreError
impl Send for CliCoreError
impl Sync for CliCoreError
impl Unpin for CliCoreError
impl UnsafeUnpin for CliCoreError
impl !UnwindSafe for CliCoreError
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