Trait finchers_ext::option::EndpointOptionExt [] [src]

pub trait EndpointOptionExt<T>: Endpoint<Output = Option<T>> + Sized {
    fn map_some<F, U>(self, f: F) -> MapSome<Self, F>
    where
        F: FnOnce(T) -> U + Clone + Send + Sync
, { ... }
fn ok_or_else<F, U>(self, f: F) -> OkOrElse<Self, F>
    where
        F: FnOnce() -> U + Clone + Send + Sync
, { ... } }

A set of extension methods which is available when the output is value is an Option.

Provided Methods

Create an endpoint which will map the value to a new type with given function.

Create an endpoint which will transform the returned value into a Result.

Implementors