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

Method Maximum

tabletype.go:90–99  ·  view source on GitHub ↗

Maximum returns the maximum size, in elements, of this table. If no maximum size is listed then `(false, 0)` is returned, otherwise `(true, N)` is returned where `N` is the maximum size.

()

Source from the content-addressed store, hash-verified

88// If no maximum size is listed then `(false, 0)` is returned, otherwise
89// `(true, N)` is returned where `N` is the maximum size.
90func (ty *TableType) Maximum() (bool, uint32) {
91 ptr := C.wasm_tabletype_limits(ty.ptr())
92 ret := uint32(ptr.max)
93 runtime.KeepAlive(ty)
94 if ret == 0xffffffff {
95 return false, 0
96 } else {
97 return true, ret
98 }
99}
100
101// AsExternType converts this type to an instance of `ExternType`
102func (ty *TableType) AsExternType() *ExternType {

Callers 3

TestTableTypeFunction · 0.95
TestMemoryType64Function · 0.45
TestMultiMemoryExportedFunction · 0.45

Calls 1

ptrMethod · 0.95

Tested by 3

TestTableTypeFunction · 0.76
TestMemoryType64Function · 0.36
TestMultiMemoryExportedFunction · 0.36