Struct holochain_wasmer_host::prelude::Table [−][src]
pub struct Table { /* fields omitted */ }
Expand description
A WebAssembly table
instance.
The Table
struct is an array-like structure representing a WebAssembly Table,
which stores function references.
A table created by the host or in WebAssembly code will be accessible and mutable from both host and WebAssembly.
Spec: https://webassembly.github.io/spec/core/exec/runtime.html#table-instances
Implementations
Creates a new Table
with the provided TableType
definition.
All the elements in the table will be set to the init
value.
This function will construct the Table
using the store
BaseTunables
.
Retrieves an element of the table at the provided index
.
Sets an element val
in the Table at the provided index
.
Grows the size of the Table
by delta
, initializating
the elements with the provided init
value.
It returns the previous size of the Table
in case is able
to grow the Table successfully.
Errors
Returns an error if the delta
is out of bounds for the table.
Copies the len
elements of src_table
starting at src_index
to the destination table dst_table
at index dst_index
.
Errors
Returns an error if the range is out of bounds of either the source or destination tables.
Trait Implementations
Convert the extern internally to hold a weak reference to the InstanceRef
.
This is useful for preventing cycles, for example for data stored in a
type implementing WasmerEnv
. Read more
Auto Trait Implementations
impl !RefUnwindSafe for Table
impl !UnwindSafe for Table
Blanket Implementations
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
pub fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
pub fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more