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

Method Name

importtype.go:83–91  ·  view source on GitHub ↗

Name returns the name in the module this import type is importing. Note that the returned string may be `nil` with the module linking proposal where this field is optional in the import type.

()

Source from the content-addressed store, hash-verified

81// Note that the returned string may be `nil` with the module linking proposal
82// where this field is optional in the import type.
83func (ty *ImportType) Name() *string {
84 ptr := C.wasm_importtype_name(ty.ptr())
85 if ptr == nil {
86 return nil
87 }
88 ret := C.GoStringN(ptr.data, C.int(ptr.size))
89 runtime.KeepAlive(ty)
90 return &ret
91}
92
93// Type returns the type of item this import type expects
94func (ty *ImportType) Type() *ExternType {

Callers 5

TestImportTypeFunction · 0.95
TestModuleImportsFunction · 0.45
TestModuleExportsFunction · 0.45
TestModuleSerializeFunction · 0.45

Calls 1

ptrMethod · 0.95

Tested by 5

TestImportTypeFunction · 0.76
TestModuleImportsFunction · 0.36
TestModuleExportsFunction · 0.36
TestModuleSerializeFunction · 0.36