Trait IntoTrap

Source
pub trait IntoTrap<T> {
    // Required method
    fn or_trap<S: Display>(self, info: S) -> Result<T>;
}

Required Methods§

Source

fn or_trap<S: Display>(self, info: S) -> Result<T>

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<T> IntoTrap<T> for Option<T>

Source§

fn or_trap<S: Display>(self, info: S) -> Result<T>

Source§

impl<T, E: Display> IntoTrap<T> for Result<T, E>

Source§

fn or_trap<S: Display>(self, info: S) -> Result<T>

Implementors§