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

Function wasmtime_structref_to_anyref

crates/c-api/src/structref.rs:53–61  ·  view source on GitHub ↗
(
    structref: Option<&wasmtime_structref_t>,
    out: &mut MaybeUninit<wasmtime_anyref_t>,
)

Source from the content-addressed store, hash-verified

51
52#[unsafe(no_mangle)]
53pub unsafe extern "C" fn wasmtime_structref_to_anyref(
54 structref: Option<&wasmtime_structref_t>,
55 out: &mut MaybeUninit<wasmtime_anyref_t>,
56) {
57 let anyref = structref
58 .and_then(|s| s.as_wasmtime())
59 .map(|s| s.to_anyref());
60 crate::initialize(out, anyref.into());
61}
62
63#[unsafe(no_mangle)]
64pub unsafe extern "C" fn wasmtime_structref_to_eqref(

Callers 1

to_anyrefMethod · 0.85

Calls 4

as_wasmtimeMethod · 0.80
initializeFunction · 0.70
mapMethod · 0.45
to_anyrefMethod · 0.45

Tested by

no test coverage detected