Type Alias EyreExitOr

Source
pub type EyreExitOr<T> = Result<Result<T, ExitCode>>;
Expand description

Encapsulate both an eyre::Result<T> and a possible subcommand exit code.

Helper type alias for the common case that we want to run a computation and return eyre::Result<T>, but it’s also possible that we run a subcommand which returns an exit code that we want to propagate. See also try_exit_code.

Aliased Type§

enum EyreExitOr<T> {
    Ok(Result<T, ExitCode>),
    Err(Report),
}

Variants§

§1.0.0

Ok(Result<T, ExitCode>)

Contains the success value

§1.0.0

Err(Report)

Contains the error value