pub trait CliErrorHandler {
type Output;
// Required methods
fn unwrap_or_exit(self) -> Self::Output;
fn then_exit(self) -> !;
}Required Associated Types§
Required Methods§
Implementations on Foreign Types§
Source§impl<T, E> CliErrorHandler for Result<T, E>
impl<T, E> CliErrorHandler for Result<T, E>
Source§fn unwrap_or_exit(self) -> T
fn unwrap_or_exit(self) -> T
Returns the result if it is Ok, otherwise exit the program with the
appropriate exit code after printing the error.
Source§fn then_exit(self) -> !
fn then_exit(self) -> !
Exit the program with appropriate exit code. This will also print the error if the result is an error.