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

Method next

crates/core/src/error/error.rs:1945–1962  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

1943
1944 #[inline]
1945 fn next(&mut self) -> Option<Self::Item> {
1946 match &mut self.state {
1947 ChainState::Ours(e) => {
1948 let core = e.inner.as_dyn_core_error();
1949 self.state = if let Some(e) = e.inner.source() {
1950 ChainState::Ours(e)
1951 } else {
1952 ChainState::Core(core.source())
1953 };
1954 Some(core)
1955 }
1956 ChainState::Core(error) => {
1957 let e = error.take()?;
1958 self.state = ChainState::Core(e.source());
1959 Some(e)
1960 }
1961 }
1962 }
1963}
1964
1965impl FusedIterator for Chain<'_> {}

Callers 8

with_field_parseFunction · 0.45
chainFunction · 0.45
chain_with_leaf_sourcesFunction · 0.45
assert_chainFunction · 0.45
parse_refMethod · 0.45
parseMethod · 0.45

Calls 3

as_dyn_core_errorMethod · 0.80
sourceMethod · 0.45
takeMethod · 0.45

Tested by 5

chainFunction · 0.36
chain_with_leaf_sourcesFunction · 0.36
assert_chainFunction · 0.36