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

Function source

crates/core/src/error/vtable.rs:94–102  ·  view source on GitHub ↗
(error: SharedPtr<'_, DynError>)

Source from the content-addressed store, hash-verified

92}
93
94unsafe fn source<E>(error: SharedPtr<'_, DynError>) -> Option<&Error>
95where
96 E: ErrorExt,
97{
98 let error = error.cast::<ConcreteError<E>>();
99 // Safety: implied by all vtable functions' safety contract.
100 let error = unsafe { error.as_ref() };
101 error.error.ext_source()
102}
103
104unsafe fn source_mut<E>(error: MutPtr<'_, DynError>) -> Option<&mut Error>
105where

Callers 1

fmtMethod · 0.85

Calls 2

as_refMethod · 0.45
ext_sourceMethod · 0.45

Tested by

no test coverage detected