pub struct Instance(_);
Expand description

An instance of a module.

Implementations

Obtain a read-only slice of underlying memory.

Safety

These slices turn invalid if the memory is resized (i.e. via the WebAssembly memory.grow instruction)

Obtain a mutable slice of underlying memory.

Safety

These slices turn invalid if the memory is resized (i.e. via the WebAssembly memory.grow instruction)

Returns the current memory size, in bytes.

Copies memory from offset to target, for the length of target.len().

Copies memory from source to offset, for the length of source.len().

Find index of exported function by name.

Unsafe execution of a given function index func_idx with the given values args.

An invalid index, invalid inputs, or invalid depth can cause undefined behaviour.

Safety

This function expects a valid func_idx and appropriate number of args.

Execute a given function of name with the given values args.

An error is returned if the function can not be found, inappropriate number of arguments are passed, or the supplied types are mismatching.

Trait Implementations

Executes the destructor for this type. 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.