pub struct Module<'a> { /* private fields */ }Expand description
Representation of an adapter module.
Implementations§
Source§impl<'a> Module<'a>
impl<'a> Module<'a>
Sourcepub fn new(
types: &'a ComponentTypesBuilder,
tunables: &'a Tunables,
features: WasmFeatures,
) -> Module<'a>
pub fn new( types: &'a ComponentTypesBuilder, tunables: &'a Tunables, features: WasmFeatures, ) -> Module<'a>
Creates an empty module.
Sourcepub fn adapt(
&mut self,
name: &str,
component: &ComponentDfg,
adapter: AdapterId,
)
pub fn adapt( &mut self, name: &str, component: &ComponentDfg, adapter: AdapterId, )
Registers a new adapter within this adapter module.
The name provided is the export name of the adapter from the final
module, and adapter indexes into component for all the metadata
necessary for compilation.
Auto Trait Implementations§
impl<'a> Freeze for Module<'a>
impl<'a> RefUnwindSafe for Module<'a>
impl<'a> Send for Module<'a>
impl<'a> Sync for Module<'a>
impl<'a> Unpin for Module<'a>
impl<'a> UnsafeUnpin for Module<'a>
impl<'a> UnwindSafe for Module<'a>
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