Struct wasmedge_sys::Instance

source ·
pub struct Instance { /* private fields */ }
Expand description

An Instance represents an instantiated module. In the instantiation process, An Instance is created from alModule. From an Instance the exported functions, tables, memories, and globals can be fetched.

Implementations§

Returns the name of this exported module instance.

If this module instance is an active module instance, then None is returned.

Returns the exported function instance by name.

Argument
Error

If fail to find the target function, then an error is returned.

Returns the exported table instance by name.

Argument
Error

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

Returns the exported memory instance by name.

Argument
Error

If fail to find the target memory instance, then an error is returned.

Returns the exported global instance by name.

Argument
Error

If fail to find the target global instance, then an error is returned.

Returns the length of the exported function instances in this module instance.

Returns the names of the exported function instances in this module instance.

Returns the length of the exported table instances in this module instance.

Returns the names of the exported table instances in this module instance.

Returns the length of the exported memory instances in this module instance.

Returns the names of all exported memory instances in this module instance.

Returns the length of the exported global instances in this module instance.

Returns the names of the exported global instances in this module instance.

Provides a raw pointer to the inner module instance context.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
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 resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
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.