Function clierr::run_and_exit
[−]
[src]
pub fn run_and_exit<E, F>(main: F) -> ! where F: FnOnce() -> Result<(), E>, E: Into<Box<StdError>>
Runs a Result
-returning function and exits the process with 0 if successful.
If main
returns an error, it displays it (and all its causes recursively) to stderr
and
exists the process with 1.