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

Class Report

libs/error-stack/src/report.rs:245–254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

243#[must_use]
244#[expect(clippy::field_scoped_visibility_modifiers)]
245pub struct Report<C: ?Sized> {
246 // The vector is boxed as this implies a memory footprint equal to a single pointer size
247 // instead of three pointer sizes. Even for small `Result::Ok` variants, the `Result` would
248 // still have at least the size of `Report`, even at the happy path. It's unexpected, that
249 // creating or traversing a report will happen in the hot path, so a double indirection is
250 // a good trade-off.
251 #[expect(clippy::box_collection)]
252 pub(super) frames: Box<Vec<Frame>>,
253 _context: PhantomData<fn() -> *const C>,
254}
255
256impl<C> Report<C> {
257 /// Creates a new `Report<Context>` from a provided scope.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected