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

Method unpack_mut

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

Source from the content-addressed store, hash-verified

1657 }
1658
1659 pub(crate) fn unpack_mut(&mut self) -> OomOrDynErrorMut<'_> {
1660 if self.is_oom() {
1661 // Safety: self.is_oom() is true
1662 OomOrDynErrorMut::Oom(unsafe { self.unchecked_oom_mut() })
1663 } else {
1664 debug_assert!(self.is_boxed_dyn_error());
1665 // Safety: self.is_boxed_dyn_error() is true.
1666 OomOrDynErrorMut::DynError(unsafe { self.unchecked_dyn_error_mut() })
1667 }
1668 }
1669
1670 pub(crate) fn into_boxed_dyn_core_error(
1671 self,

Callers 3

take_backtraceMethod · 0.80
source_mutMethod · 0.80
downcast_mutMethod · 0.80

Calls 4

DynErrorClass · 0.85
unchecked_oom_mutMethod · 0.80
is_oomMethod · 0.45

Tested by

no test coverage detected