[][src]Trait mod_utilities::IntoResult

pub trait IntoResult {
    type Value;
    fn into_result<E, F>(self, if_none: F) -> Result<Self::Value, E>
    where
        F: FnOnce() -> E
; }

Allows the creation of a Result with a custom Err from a container type

Associated Types

type Value

The inner value type of the container, which becomes the Ok variant of Result when into_result is called

Loading content...

Required methods

fn into_result<E, F>(self, if_none: F) -> Result<Self::Value, E> where
    F: FnOnce() -> E, 

Convert a container to a Result with a custom Err

Loading content...

Implementations on Foreign Types

impl<T> IntoResult for Option<T>[src]

type Value = T

Loading content...

Implementors

Loading content...