pub enum WasmModule {
    Module(u64),
    Inherit,
}
Expand description

A compiled instance of a WebAssembly module.

Creating a module will also JIT compile it, this can be a compute intensive tasks.

Variants

Module(u64)

Inherit

Implementations

Compiles a WebAssembly module.

Once a module is compiled, functions like spawn can be used to spawn new processes from it.

Returns the id of the module resource or -1 in case it’s an inherited module.

Spawn a new process and use function as the entry point. If the function takes arguments the passed in params need to exactly match their types.

Spawn a new process and link it to the current one.

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.