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

Method _from_raw

crates/wasmtime/src/runtime/func.rs:1054–1063  ·  view source on GitHub ↗

Same as `from_raw`, but with the internal `StoreOpaque` type.

(store: &mut StoreOpaque, raw: *mut c_void)

Source from the content-addressed store, hash-verified

1052
1053 /// Same as `from_raw`, but with the internal `StoreOpaque` type.
1054 pub(crate) unsafe fn _from_raw(store: &mut StoreOpaque, raw: *mut c_void) -> Option<Func> {
1055 // SAFETY: this function's own contract is that `raw` is owned by store
1056 // to make this safe.
1057 unsafe {
1058 Some(Func::from_vm_func_ref(
1059 store.id(),
1060 NonNull::new(raw.cast())?,
1061 ))
1062 }
1063 }
1064
1065 /// Extracts the raw value of this `Func`, which is owned by `store`.
1066 ///

Callers

nothing calls this directly

Calls 3

newFunction · 0.50
idMethod · 0.45
castMethod · 0.45

Tested by

no test coverage detected