Trait easy_shortcuts::traits::Die [] [src]

pub trait Die<T> {
    fn or_die(self, msg: &str) -> T;
}

Perl-like 'die' quit on error

Required Methods

this is like expect but quits with non-zero code instead of panicking. Defined for Option and Result

extern crate easy_shortcuts; use easy_shortcuts::traits::Die; use std::env; let = env::home_dir().or_die("no home!");

Implementors