pub fn try_with<R, T, E>( receiver: &R, closure: impl FnOnce(&R) -> Result<T, E>, ) -> Result<T, E>
Calls the specified closure with the given receiver and returns a Result.
closure
receiver
Result