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

Method change_context_lazy

libs/error-stack/src/result.rs:127–136  ·  view source on GitHub ↗
(self, context: F)

Source from the content-addressed store, hash-verified

125
126 #[track_caller]
127 fn change_context_lazy<C, F>(self, context: F) -> Result<T, Report<C>>
128 where
129 C: Error + Send + Sync + 'static,
130 F: FnOnce() -> C,
131 {
132 match self {
133 Ok(value) => Ok(value),
134 Err(error) => Err(error.into_report().change_context(context())),
135 }
136 }
137}

Callers

nothing calls this directly

Calls 5

OkInterface · 0.85
ErrInterface · 0.85
contextFunction · 0.50
change_contextMethod · 0.45
into_reportMethod · 0.45

Tested by

no test coverage detected