pub enum CommonError {
ShellParse(String),
CommandExecution(String),
FileSystem(Error),
Json(Error),
WithContext {
context: String,
source: Box<dyn Error + Send + Sync>,
},
Other(Error),
}Expand description
Common error type for raz operations
Variants§
ShellParse(String)
Shell command parsing error
CommandExecution(String)
Command execution error
FileSystem(Error)
File system operation error
Json(Error)
JSON serialization/deserialization error
WithContext
Generic error with context
Other(Error)
Other errors
Implementations§
Source§impl CommonError
impl CommonError
Sourcepub fn with_context<E>(context: impl Into<String>, error: E) -> Self
pub fn with_context<E>(context: impl Into<String>, error: E) -> Self
Create an error with additional context
Sourcepub fn shell_parse(msg: impl Into<String>) -> Self
pub fn shell_parse(msg: impl Into<String>) -> Self
Create a shell parse error
Sourcepub fn command_execution(msg: impl Into<String>) -> Self
pub fn command_execution(msg: impl Into<String>) -> Self
Create a command execution error
Trait Implementations§
Source§impl Debug for CommonError
impl Debug for CommonError
Source§impl Display for CommonError
impl Display for CommonError
Source§impl Error for CommonError
impl Error for CommonError
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 From<Error> for CommonError
impl From<Error> for CommonError
Source§impl From<Error> for CommonError
impl From<Error> for CommonError
Auto Trait Implementations§
impl Freeze for CommonError
impl !RefUnwindSafe for CommonError
impl Send for CommonError
impl Sync for CommonError
impl Unpin for CommonError
impl !UnwindSafe for CommonError
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> Contextual for Twhere
T: Display,
impl<T> Contextual for Twhere
T: Display,
Source§fn with_context(&self, context: impl Display) -> String
fn with_context(&self, context: impl Display) -> String
Format with additional context