pub trait WithOrExit<T> {
    fn or_exit_with(self, exit_code: i32) -> T;
}
Expand description

Trait that adds the or_exit_with method to a struct. To be used to create a way to retrieve a value, or exit with a specified error code.

Required Methods

Implementations on Foreign Types

Unwraps the value from a Result, or terminates the process with the specified exit code.

Implementors