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

Method source

crates/core/src/error/error.rs:1707–1718  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

1705 }
1706
1707 fn source(&self) -> Option<&Error> {
1708 match self.unpack() {
1709 OomOrDynErrorRef::DynError(e) => {
1710 // Safety: invariant of this type.
1711 let vtable = unsafe { e.as_ref().vtable };
1712 // Safety: using the vtable associated with this pointer's
1713 // concrete type and the pointer is valid.
1714 unsafe { (vtable.source)(e) }
1715 }
1716 OomOrDynErrorRef::Oom(_) => None,
1717 }
1718 }
1719
1720 fn source_mut(&mut self) -> Option<&mut Error> {
1721 match self.unpack_mut() {

Callers 4

fmtMethod · 0.45
error_ext_chainMethod · 0.45
debugMethod · 0.45
nextMethod · 0.45

Calls 2

unpackMethod · 0.45
as_refMethod · 0.45

Tested by

no test coverage detected