pub trait OptionExt<T> {
    fn try_map<U, E, F>(self, f: F) -> Result<Option<U>, E>
    where
        F: FnOnce(T) -> Result<U, E>
; fn try_and_then<U, E, F>(self, f: F) -> Result<Option<U>, E>
    where
        F: FnOnce(T) -> Result<Option<U>, E>
; }
Expand description

Alternative failable methods on Option

Required Methods

Option::map() alternative that can return a result

Option::and_then() alternative that can return a result

Implementations on Foreign Types

Implementors