pub struct Bindgen {
pub resolve: Resolve,
pub world: WorldId,
pub metadata: ModuleMetadata,
pub producers: Option<Producers>,
}
Expand description
The result of decoding binding information from a WebAssembly binary.
This structure is returned by decode
and represents the interface of a
WebAssembly binary.
Fields§
§resolve: Resolve
Interface and type information for this binary.
world: WorldId
The world that was bound.
metadata: ModuleMetadata
Metadata about this specific module that was bound.
producers: Option<Producers>
Producer information about tools used to produce this specific module.
Implementations§
Source§impl Bindgen
impl Bindgen
Sourcepub fn merge(&mut self, other: Bindgen) -> Result<IndexSet<WorldKey>>
pub fn merge(&mut self, other: Bindgen) -> Result<IndexSet<WorldKey>>
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.
This function returns the set of exports that the main world of
other
added to the world in self
.