Trait UnwrapExt

Source
pub trait UnwrapExt {
    type T;

    // Required methods
    fn unwrap_fatal(self) -> Self::T;
    fn expect_fatal(self, message: impl Display) -> Self::T;
}
Expand description

An extension trait for unwrap.

Required Associated Types§

Source

type T

Required Methods§

Source

fn unwrap_fatal(self) -> Self::T

An extension synonym for unwrap.

Source

fn expect_fatal(self, message: impl Display) -> Self::T

An extension synonym for expect.

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, E: Display> UnwrapExt for Result<T, E>

Source§

type T = T

Source§

fn unwrap_fatal(self) -> Self::T

Source§

fn expect_fatal(self, message: impl Display) -> Self::T

Implementors§