pub struct BindgenMetadata {
    pub world: World,
    pub import_encodings: IndexMap<(String, String), StringEncoding>,
    pub export_encodings: IndexMap<String, StringEncoding>,
}
Expand description

Result of extracting interfaces embedded within a core wasm file.

This structure is returned by the [extract_module_interfaces] function.

Fields

world: World

All interfaces found within a module, merged together into one World.

import_encodings: IndexMap<(String, String), StringEncoding>

Per-function options imported into the core wasm module, currently only related to string encoding.

export_encodings: IndexMap<String, StringEncoding>

Per-function options exported from the core wasm module, currently only related to string encoding.

Implementations

Creates a new BindgenMetadata instance holding the given set of interfaces which are expected to all use the encoding specified.

Merges another BindgenMetadata into this one.

This operation is intended to be akin to “merging worlds” when the abstraction level for that is what we’re working at here. For now the merge operation only succeeds if the two metadata descriptions are entirely disjoint.

Note that at this time there’s no support for changing string encodings between metadata.

Trait Implementations

Returns the “default value” for a 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.