Struct wasmer::Exports[][src]

pub struct Exports { /* fields omitted */ }
Expand description

Exports is a special kind of map that allows easily unwrapping the types of instances.

TODO: add examples of using exports

Implementations

Creates a new Exports.

Creates a new Exports with capacity n.

Return the number of exports in the Exports map.

Return whether or not there are no exports

Insert a new export into this Exports map.

Get an export given a name.

The get method is specifically made for usage inside of Rust APIs, as we can detect what’s the desired type easily.

If you want to get an export dynamically with type checking please use the following functions: get_func, get_memory, get_table or get_global instead.

If you want to get an export dynamically handling manually type checking manually, please use get_extern.

Get an export as a Global.

Get an export as a Memory.

Get an export as a Table.

Get an export as a Func.

Get an export as a NativeFunc.

Hack to get this working with nativefunc too

Like get_with_generics but with a WeakReference to the InstanceRef internally. This is useful for passing data into WasmerEnv, for example.

Get an export as an Extern.

Returns true if the Exports contains the given export name.

Get an iterator over the exports.

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

Returns the “default value” for a type. Read more

Creates a value from an iterator. Read more

Gets an export by name.

Gets all exports in the namespace.

Returns the size of the referenced value in bytes. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

The archived version of the pointer metadata for this type.

Converts some archived metadata to the pointer metadata for itself.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type for metadata in pointers and references to Self.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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.