Trait expect_exit::Expected
source · [−]pub trait Expected<T>where
Self: Sized,{
fn or_exit<F>(self, f: F) -> T
where
F: FnOnce() -> String;
fn or_die<F>(self, f: F) -> T
where
F: FnOnce() -> String;
fn or_exit_(self, msg: &str) -> T { ... }
fn or_die_(self, msg: &str) -> T { ... }
fn expect_or_exit_(self, msg: &str) -> T { ... }
fn expect_or_exit<F>(self, f: F) -> T
where
F: FnOnce() -> String,
{ ... }
fn expect_or_die_(self, msg: &str) -> T { ... }
fn expect_or_die<F>(self, f: F) -> T
where
F: FnOnce() -> String,
{ ... }
}Expand description
Unwrap or exit with the specified message.
Required Methods
Provided Methods
sourcefn or_exit_(self, msg: &str) -> T
fn or_exit_(self, msg: &str) -> T
Test the value. On success, return the unwrapped value. On error, unwind the stack, display the specified message, and exit.
sourcefn or_die_(self, msg: &str) -> T
fn or_die_(self, msg: &str) -> T
Test the value. On success, return the unwrapped value. On error, do not unwind the stack, display the specified message, and exit.
sourcefn expect_or_exit_(self, msg: &str) -> T
fn expect_or_exit_(self, msg: &str) -> T
Alias for Expected::or_exit_.
sourcefn expect_or_exit<F>(self, f: F) -> Twhere
F: FnOnce() -> String,
fn expect_or_exit<F>(self, f: F) -> Twhere
F: FnOnce() -> String,
Alias for Expected::or_exit.
sourcefn expect_or_die_(self, msg: &str) -> T
fn expect_or_die_(self, msg: &str) -> T
Alias for Expected::or_die_.
sourcefn expect_or_die<F>(self, f: F) -> Twhere
F: FnOnce() -> String,
fn expect_or_die<F>(self, f: F) -> Twhere
F: FnOnce() -> String,
Alias for Expected::or_die.