(&mut self, error: impl Into<Report<C>>)
| 210 | /// [`append`]: ReportSink::append |
| 211 | #[track_caller] |
| 212 | pub fn capture(&mut self, error: impl Into<Report<C>>) { |
| 213 | let report = error.into(); |
| 214 | |
| 215 | match self.report.as_mut() { |
| 216 | Some(existing) => existing.push(report), |
| 217 | None => self.report = Some(report.into()), |
| 218 | } |
| 219 | } |
| 220 | |
| 221 | /// Attempts to execute a fallible operation and collect any errors. |
| 222 | /// |