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.
()
| 81 | // Note that the returned string may be `nil` with the module linking proposal |
| 82 | // where this field is optional in the import type. |
| 83 | func (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 |
| 94 | func (ty *ImportType) Type() *ExternType { |