pub enum CliTestError {
}Expand description
Error types for CLI testing operations
Variants§
BinaryNotFound(PathBuf)
Binary file not found at specified path
BinaryNotExecutable(PathBuf)
Binary file exists but is not executable
ExecutionFailed(String)
Failed to execute the binary
InvalidHelpOutput
Help output is invalid or cannot be parsed
OptionParseError(String)
Failed to parse option from help text
TemplateError(String)
Template rendering failed
BatsExecutionFailed(String)
BATS test execution failed
ReportError(String)
Report generation failed
Config(String)
Configuration error
Validation(String)
Validation error
IoError(Error)
I/O error occurred
Json(Error)
JSON serialization/deserialization error
Yaml(Error)
YAML serialization/deserialization error
Implementations§
Source§impl CliTestError
impl CliTestError
Sourcepub fn detailed_message(&self) -> String
pub fn detailed_message(&self) -> String
Get detailed error message for logging (may contain sensitive info)
This method provides verbose error details suitable for logging but should NOT be displayed directly to end users.
Sourcepub fn user_message(&self) -> String
pub fn user_message(&self) -> String
Get user-friendly colored error message with helpful suggestions
This method formats errors with colors and provides actionable suggestions for users to resolve common issues.
Sourcepub fn print_error(&self)
pub fn print_error(&self)
Print error with color to stderr
Trait Implementations§
Source§impl Debug for CliTestError
impl Debug for CliTestError
Source§impl Display for CliTestError
impl Display for CliTestError
Source§impl Error for CliTestError
impl Error for CliTestError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<Error> for CliTestError
impl From<Error> for CliTestError
Source§impl From<Error> for CliTestError
impl From<Error> for CliTestError
Auto Trait Implementations§
impl Freeze for CliTestError
impl !RefUnwindSafe for CliTestError
impl Send for CliTestError
impl Sync for CliTestError
impl Unpin for CliTestError
impl !UnwindSafe for CliTestError
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
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>
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>
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 more