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

Method attempt

libs/error-stack/src/sink.rs:250–261  ·  view source on GitHub ↗
(&mut self, result: Result<T, R>)

Source from the content-addressed store, hash-verified

248 /// ```
249 #[track_caller]
250 pub fn attempt<T, R>(&mut self, result: Result<T, R>) -> Option<T>
251 where
252 R: Into<Report<C>>,
253 {
254 match result {
255 Ok(value) => Some(value),
256 Err(error) => {
257 self.capture(error);
258 None
259 }
260 }
261 }
262
263 /// Finishes the sink and returns a [`Result`].
264 ///

Callers 10

newMethod · 0.80
run_implMethod · 0.80
bless_outputsMethod · 0.80
assert_outputsMethod · 0.80
load_reportsFunction · 0.80
delete_userFunction · 0.80
validate_valueMethod · 0.80
validate_valueMethod · 0.80

Calls 1

captureMethod · 0.45

Tested by

no test coverage detected