[][src]Trait mod_utilities::UnwrapPretty

pub trait UnwrapPretty {
    type Result;
    fn unwrap_pretty(self) -> Self::Result;
fn expect_pretty(self, msg: &str) -> Self::Result; }

Convenience trait to unwrap and expect Results where the Err implements Display and can be printed prettier than with Err formatted with Debug

Associated Types

type Result

The type of the inner value yielded by unwrap_pretty and expect_pretty

Loading content...

Required methods

fn unwrap_pretty(self) -> Self::Result

Unwrap a container type and if there is an error, print it with fmt::Display

fn expect_pretty(self, msg: &str) -> Self::Result

Unwrap a container type and if there is an error, print it and a message using fmt::Display

Loading content...

Implementations on Foreign Types

impl<R, E> UnwrapPretty for Result<R, E> where
    E: Display
[src]

type Result = R

Loading content...

Implementors

Loading content...