pub trait ToExitCode<T> {
    fn to_exit_code(self) -> Result<T, ExitCode>;
    fn to_exit_code_with(self, _: Settings) -> Result<T, ExitCode>;
}

Required Methods

Implementations on Foreign Types

Returns an exit code of 0 if the error was a broken pipe, else 1

Returns an exit code depending on the settings

Via the settings, errors can be ignores (translates to exit code zero). All other errors are translated into exit code 1

Implementors