(mut self, attachment: A)
| 555 | /// [`attach()`]: Self::attach |
| 556 | #[track_caller] |
| 557 | pub fn attach_opaque<A>(mut self, attachment: A) -> Self |
| 558 | where |
| 559 | A: OpaqueAttachment, |
| 560 | { |
| 561 | let old_frames = mem::replace(self.frames.as_mut(), Vec::with_capacity(1)); |
| 562 | self.frames.push(Frame::from_attachment( |
| 563 | attachment, |
| 564 | old_frames.into_boxed_slice(), |
| 565 | )); |
| 566 | self |
| 567 | } |
| 568 | |
| 569 | /// Add a new [`Error`] object to the top of the [`Frame`] stack, changing the type of the |
| 570 | /// `Report`. |