Trait FailedTo

Source
pub trait FailedTo<O> {
    // Required method
    fn or_failed_to(self, message: impl Display) -> O;
}
Expand description

Extension of Result that allows program to panic with Display message on Err for fatal application errors that are not bugs

Required Methods§

Source

fn or_failed_to(self, message: impl Display) -> O

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<O> FailedTo<O> for Option<O>

Source§

fn or_failed_to(self, message: impl Display) -> O

Source§

impl<O, E> FailedTo<O> for Result<O, E>
where E: Into<Problem>,

Source§

fn or_failed_to(self, message: impl Display) -> O

Implementors§