MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime-go / Funcref

Method Funcref

val.go:149–154  ·  view source on GitHub ↗

Funcref returns the underlying function if this is a `funcref`, or panics. Note that a null `funcref` is returned as `nil`.

()

Source from the content-addressed store, hash-verified

147//
148// Note that a null `funcref` is returned as `nil`.
149func (v Val) Funcref() *Func {
150 if v.Kind() != KindFuncref {
151 panic("not a funcref")
152 }
153 return v.val.(*Func)
154}
155
156// Get returns the underlying 64-bit float if this is an `f64`, or panics.
157func (v Val) Get() interface{} {

Callers 1

TestTableFunction · 0.80

Calls 1

KindMethod · 0.95

Tested by 1

TestTableFunction · 0.64