logo
pub struct Table { /* private fields */ }
Expand description

Defines a table storing the references to host functions or external objects.

Implementations

Creates a new wasm table instance with the given type.

Argument
  • ty - The type of the table instance to be created.
Error

If fail to create the table instance, then an error is returned.

Returns the exported name of this Table.

Notice that this field is meaningful only if this table is used as an exported instance.

Returns the name of the module instance from which this Table exports.

Notice that this field is meaningful only if this table is used as an exported instance.

Returns the type of this table.

Error

If fail to get the type of this table, then an error is returned.

Returns the size of this Table.

Grows the size of this table by delta, initializating the elements with the provided init value if init is given.

Arguments
  • delta - the number of elements to grow the table by.
Error

If fail to grow the table, then an error is returned.

Returns the table element at the index.

Argument
  • index - the index of the table element to get.
Error

If fail to get the table element, then an error is returned.

Stores the data at the index of this table.

Arguments
  • index - the index of the table element to store.

  • data - the data to store at the index of this table.

Error

If fail to store the data, then an error is returned.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.