Method lrs::result::Result::map

If the success value is present, replaces it by the result of a function application.

Syntax

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

Arguments

NameDescription
f

The function that will be applied to the value.