Struct wit_component::metadata::Bindgen
source · 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<WorldId>
pub fn merge(&mut self, other: Bindgen) -> Result<WorldId>
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§
Auto Trait Implementations§
impl RefUnwindSafe for Bindgen
impl Send for Bindgen
impl Sync for Bindgen
impl Unpin for Bindgen
impl UnwindSafe for Bindgen
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more