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

Function as_dyn_core_error

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

Source from the content-addressed store, hash-verified

122}
123
124unsafe fn as_dyn_core_error<E>(
125 error: SharedPtr<'_, DynError>,
126) -> &(dyn core::error::Error + Send + Sync + 'static)
127where
128 E: ErrorExt,
129{
130 let error = error.cast::<ConcreteError<E>>();
131 // Safety: implied by all vtable functions' safety contract.
132 let error = unsafe { error.as_ref() };
133 error.error.ext_as_dyn_core_error()
134}
135
136unsafe fn into_boxed_dyn_core_error<E>(
137 error: OwnedPtr<DynError>,

Callers

nothing calls this directly

Calls 2

as_refMethod · 0.45
ext_as_dyn_core_errorMethod · 0.45

Tested by

no test coverage detected