Trait enso_flexer::prelude::logger::prelude::ResultOps[][src]

pub trait ResultOps {
    type Item;
    type Error;
    fn handle_err<F>(self, f: F) -> Option<Self::Item>
    where
        F: FnOnce(Self::Error)
; }
Expand description

Adds utilities to the Result type.

Associated Types

Loading content...

Required methods

fn handle_err<F>(self, f: F) -> Option<Self::Item> where
    F: FnOnce(Self::Error), 
[src]

Expand description

Call the given handler if this is an error and promote Result to Option.

Loading content...

Implementations on Foreign Types

impl<T, E> ResultOps for Result<T, E>[src]

type Item = T

type Error = E

pub fn handle_err<F>(self, f: F) -> Option<<Result<T, E> as ResultOps>::Item> where
    F: FnOnce(<Result<T, E> as ResultOps>::Error), 
[src]

Loading content...

Implementors

Loading content...