Method lrs::result::Result::chain

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

Syntax

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

Arguments

NameDescription
f

The function that will be applied to the value.