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

Method unpack

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

Source from the content-addressed store, hash-verified

1646 }
1647
1648 pub(crate) fn unpack(&self) -> OomOrDynErrorRef<'_> {
1649 if self.is_oom() {
1650 // Safety: is_oom() is true.
1651 OomOrDynErrorRef::Oom(unsafe { self.unchecked_oom() })
1652 } else {
1653 debug_assert!(self.is_boxed_dyn_error());
1654 // Safety: self.is_boxed_dyn_error() is true.
1655 OomOrDynErrorRef::DynError(unsafe { self.unchecked_dyn_error_ref() })
1656 }
1657 }
1658
1659 pub(crate) fn unpack_mut(&mut self) -> OomOrDynErrorMut<'_> {
1660 if self.is_oom() {

Callers 10

sourceMethod · 0.45
isMethod · 0.45
displayMethod · 0.45
debugMethod · 0.45
downcast_refMethod · 0.45
as_dyn_core_errorMethod · 0.45
backtraceMethod · 0.45
convert_sub_typeMethod · 0.45
convert_cont_typeMethod · 0.45
make_api_callsFunction · 0.45

Calls 4

DynErrorClass · 0.85
unchecked_oomMethod · 0.80
is_oomMethod · 0.45

Tested by

no test coverage detected