[−][src]Trait stdinout::OrExit
Types implementing the OrExit
provide the or_exit
function that can
be used to exit a program when a computation was not successful.
The goal of this thread is to provide a function similar to unwrap()
without a panic.
Required methods
fn or_exit(self, message: S, code: i32) -> R
Exit the program with the given message and status code if the computation is not successful. Otherwise, unwrap the value and return it.
Implementations on Foreign Types
impl<R, S, E> OrExit<R, S> for Result<R, E> where
S: AsRef<str>,
E: Display,
[src]
S: AsRef<str>,
E: Display,
impl<R, S> OrExit<R, S> for Option<R> where
S: AsRef<str>,
[src]
Loading content...
S: AsRef<str>,