Method lrs::option::Option::chain

Applies a function to the value (if any) and returns the result.

Syntax

impl<T> Option<T> {
    fn chain<U, F>(self, f: F) -> Option<U>
        where F: FnOnce(T) -> Option<U>,
}

Arguments

NameDescription
f

The function that will be applied to the value.