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

Method funcref

crates/wasmtime/src/runtime/values.rs:491–497  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

489 /// If this is a non-null `funcref`, then `Some(Some(..))` is returned.
490 #[inline]
491 pub fn funcref(&self) -> Option<Option<&Func>> {
492 match self {
493 Val::FuncRef(None) => Some(None),
494 Val::FuncRef(Some(f)) => Some(Some(f)),
495 _ => None,
496 }
497 }
498
499 /// Returns the underlying `funcref` value of this `Val`, panicking if it's the
500 /// wrong type.

Callers 1

unwrap_funcrefMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected