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

Method take_backtrace

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

Source from the content-addressed store, hash-verified

1227
1228 #[cfg(feature = "backtrace")]
1229 pub(crate) fn take_backtrace(&mut self) -> Option<Backtrace> {
1230 match self.inner.unpack_mut() {
1231 OomOrDynErrorMut::Oom(_) => None,
1232 OomOrDynErrorMut::DynError(mut e) => {
1233 let r = unsafe { e.as_mut() };
1234 r.backtrace.take()
1235 }
1236 }
1237 }
1238}
1239
1240/// `ErrorExt` wrapper for foreign `core::error::Error` implementations.

Callers 1

newMethod · 0.45

Calls 3

unpack_mutMethod · 0.80
as_mutMethod · 0.45
takeMethod · 0.45

Tested by

no test coverage detected