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

Method attach_opaque_with

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

Source from the content-addressed store, hash-verified

102
103 #[track_caller]
104 fn attach_opaque_with<A, F>(self, attachment: F) -> Result<T, Report<E::Context>>
105 where
106 A: OpaqueAttachment,
107 F: FnOnce() -> A,
108 {
109 match self {
110 Ok(value) => Ok(value),
111 Err(error) => Err(error.into_report().attach_opaque(attachment())),
112 }
113 }
114
115 #[track_caller]
116 fn change_context<C>(self, context: C) -> Result<T, Report<C>>

Callers

nothing calls this directly

Calls 5

OkInterface · 0.85
ErrInterface · 0.85
attachmentFunction · 0.85
attach_opaqueMethod · 0.45
into_reportMethod · 0.45

Tested by

no test coverage detected