map

Function map 

Source
pub fn map<A, B, E, F>(result: Result<A, E>, transform: F) -> Result<B, E>
where F: FnOnce(A) -> B,
Expand description

Applies a function to the success value if present, otherwise returns the error. Equivalent to Swift’s map for Result.