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

Method attach_with

libs/error-stack/src/result.rs:81–90  ·  view source on GitHub ↗
(self, attachment: F)

Source from the content-addressed store, hash-verified

79
80 #[track_caller]
81 fn attach_with<A, F>(self, attachment: F) -> Result<T, Report<E::Context>>
82 where
83 A: Attachment,
84 F: FnOnce() -> A,
85 {
86 match self {
87 Ok(value) => Ok(value),
88 Err(error) => Err(error.into_report().attach(attachment())),
89 }
90 }
91
92 #[track_caller]
93 fn attach_opaque<A>(self, attachment: A) -> Result<T, Report<E::Context>>

Callers

nothing calls this directly

Calls 5

OkInterface · 0.85
ErrInterface · 0.85
attachmentFunction · 0.85
attachMethod · 0.45
into_reportMethod · 0.45

Tested by

no test coverage detected