[][src]Trait libimagerror::io::ToExitCode

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

Required methods

Loading content...

Implementations on Foreign Types

impl<T> ToExitCode<T> for Result<T, Error>[src]

fn to_exit_code(self) -> Result<T, ExitCode>[src]

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

fn to_exit_code_with(self, settings: Settings) -> Result<T, ExitCode>[src]

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

Loading content...

Implementors

Loading content...