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

Method expand

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

Converts a `Report` with a single context into a `Report` with multiple contexts. This function allows for the transformation of a `Report ` into a `Report<[C]>`, enabling the report to potentially hold multiple current contexts of the same type. # Example ``` use error_stack::Report; #[derive(Debug)] struct SystemFailure; impl std::fmt::Display for SystemFailure { fn fmt(&self, f: &mut std

(self)

Source from the content-addressed store, hash-verified

376 /// assert_eq!(failures.current_frames().len(), 2);
377 /// ```
378 pub fn expand(self) -> Report<[C]> {
379 Report {
380 frames: self.frames,
381 _context: PhantomData,
382 }
383 }
384
385 /// Returns the direct current frames of this report.
386 ///

Callers 15

create_producerMethod · 0.80
newMethod · 0.80
bindMethod · 0.80
bindMethod · 0.80
from_iterMethod · 0.80
expanded_errorFunction · 0.80
buildFunction · 0.80
create_sources_nestedFunction · 0.80
sourcesFunction · 0.80
sources_transparentFunction · 0.80

Calls

no outgoing calls

Tested by 15

expanded_errorFunction · 0.64
buildFunction · 0.64
create_sources_nestedFunction · 0.64
sourcesFunction · 0.64
sources_transparentFunction · 0.64
complexFunction · 0.64
downcast_mut_second_rootFunction · 0.64
sourcesFunction · 0.64
push_appendFunction · 0.64