(&mut self, result: Result<T, R>)
| 248 | /// ``` |
| 249 | #[track_caller] |
| 250 | pub fn attempt<T, R>(&mut self, result: Result<T, R>) -> Option<T> |
| 251 | where |
| 252 | R: Into<Report<C>>, |
| 253 | { |
| 254 | match result { |
| 255 | Ok(value) => Some(value), |
| 256 | Err(error) => { |
| 257 | self.capture(error); |
| 258 | None |
| 259 | } |
| 260 | } |
| 261 | } |
| 262 | |
| 263 | /// Finishes the sink and returns a [`Result`]. |
| 264 | /// |
no test coverage detected