[][src]Trait rdcl_aoc_helpers::error::WithOrExit

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

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

pub fn or_exit_with(self, exit_code: i32) -> T[src]

Loading content...

Implementations on Foreign Types

impl<T, E: Debug> WithOrExit<T> for Result<T, E>[src]

pub fn or_exit_with(self, exit_code: i32) -> T[src]

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

impl<T> WithOrExit<T> for Option<T>[src]

Loading content...

Implementors

Loading content...