Function poison::map_result [] [src]

pub fn map_result<T, U, F>(result: LockResult<T>, f: F) -> LockResult<U> where
    F: FnOnce(T) -> U, 

A simple, useful combinator for dealing with LockResult.

Applies the action to either the Ok or Err variants of the LockResult and returns a new LockResult in the same state with a new value.