MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / error_ext_zip

Method error_ext_zip

crates/core/src/error/error.rs:894–905  ·  view source on GitHub ↗
(mut self, mut f: impl FnMut(Error) -> Result<T, Error>)

Source from the content-addressed store, hash-verified

892
893 #[inline]
894 fn error_ext_zip<T>(mut self, mut f: impl FnMut(Error) -> Result<T, Error>) -> Result<T, Self> {
895 let mut maybe_link = Some(&mut self);
896 while let Some(link) = maybe_link.take() {
897 let e = mem::replace(link, OutOfMemory::new(1).into());
898 *link = match f(e) {
899 Ok(x) => return Ok(x),
900 Err(e) => e,
901 };
902 maybe_link = link.inner.source_mut();
903 }
904 Err(self)
905 }
906
907 /// Is this an `E` error?
908 ///

Callers 1

downcastMethod · 0.80

Calls 6

OkFunction · 0.85
source_mutMethod · 0.80
replaceFunction · 0.50
newFunction · 0.50
fFunction · 0.50
takeMethod · 0.45

Tested by

no test coverage detected