MCPcopy Create free account
hub / github.com/hashintel/hash / attach_opaque

Method attach_opaque

libs/error-stack/src/report.rs:557–567  ·  view source on GitHub ↗
(mut self, attachment: A)

Source from the content-addressed store, hash-verified

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`.

Callers 15

from_frameMethod · 0.45
linearFunction · 0.45
linear_extFunction · 0.45
multiline_contextFunction · 0.45
sourcesFunction · 0.45
sources_transparentFunction · 0.45
complexFunction · 0.45
hookFunction · 0.45
hook_contextFunction · 0.45
hook_for_contextFunction · 0.45
hook_multipleFunction · 0.45
hook_decrFunction · 0.45

Calls 3

with_capacityFunction · 0.85
pushMethod · 0.65
as_mutMethod · 0.45

Tested by 15

linearFunction · 0.36
linear_extFunction · 0.36
multiline_contextFunction · 0.36
sourcesFunction · 0.36
sources_transparentFunction · 0.36
complexFunction · 0.36
hookFunction · 0.36
hook_contextFunction · 0.36
hook_for_contextFunction · 0.36
hook_multipleFunction · 0.36
hook_decrFunction · 0.36
hook_incrFunction · 0.36