Class Table
Represents a WebAssembly table.
Inheritance
Namespace: Wasmtime
Assembly: Wasmtime.Dotnet.dll
Syntax
public class Table : object
Constructors
| Improve this Doc View SourceTable(Store, ValueKind, Nullable<Object>, UInt32, UInt32)
Creates a new WebAssembly table.
Declaration
public Table(Store store, ValueKind kind, object? initialValue, uint initial, uint maximum = null)
Parameters
Type | Name | Description |
---|---|---|
Store | store | The store to create the table in. |
ValueKind | kind | The value kind for the elements in the table. |
System.Nullable<System.Object> | initialValue | The initial value for elements in the table. |
System.UInt32 | initial | The number of initial elements in the table. |
System.UInt32 | maximum | The maximum number of elements in the table. |
Properties
| Improve this Doc View SourceKind
Gets the value kind of the table.
Declaration
public ValueKind Kind { get; }
Property Value
Type | Description |
---|---|
ValueKind |
Maximum
The maximum table element size.
Declaration
public uint Maximum { get; }
Property Value
Type | Description |
---|---|
System.UInt32 |
Minimum
The minimum table element size.
Declaration
public uint Minimum { get; }
Property Value
Type | Description |
---|---|
System.UInt32 |
Methods
| Improve this Doc View SourceGetElement(UInt32)
Gets an element from the table.
Declaration
public object? GetElement(uint index)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | index | The index in the table to get the element of. |
Returns
Type | Description |
---|---|
System.Nullable<System.Object> | Returns the table element. |
GetSize()
Gets the current size of the table.
Declaration
public uint GetSize()
Returns
Type | Description |
---|---|
System.UInt32 | Returns the current size of the table. |
Grow(UInt32, Nullable<Object>)
Grows the table by the given number of elements.
Declaration
public uint Grow(uint delta, object? initialValue)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | delta | The number of elements to grow the table. |
System.Nullable<System.Object> | initialValue | The initial value for the new elements. |
Returns
Type | Description |
---|---|
System.UInt32 | Returns the previous number of elements in the table. |
SetElement(UInt32, Nullable<Object>)
Sets an element in the table.
Declaration
public void SetElement(uint index, object? value)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | index | The index in the table to set the element of. |
System.Nullable<System.Object> | value | The value to set. |