pub fn map_error<A, E, F, G>(result: Result<A, E>, transform: F) -> Result<A, F>where
F: FnOnce(E) -> F,Expand description
Applies a function to the error value if present, otherwise returns the success value. Equivalent to Swift’s mapError for Result.