Struct wasmtime_environ::ModuleTypesBuilder
source · pub struct ModuleTypesBuilder { /* private fields */ }
Expand description
A builder for ModuleTypes
.
Implementations§
source§impl ModuleTypesBuilder
impl ModuleTypesBuilder
sourcepub fn reserve_wasm_signatures(&mut self, amt: usize)
pub fn reserve_wasm_signatures(&mut self, amt: usize)
Reserves space for amt
more type signatures.
sourcepub fn wasm_func_type(
&mut self,
id: CoreTypeId,
sig: WasmFuncType
) -> SignatureIndex
pub fn wasm_func_type( &mut self, id: CoreTypeId, sig: WasmFuncType ) -> SignatureIndex
Interns the sig
specified and returns a unique SignatureIndex
that
can be looked up within ModuleTypes
to recover the WasmFuncType
at runtime.
sourcepub fn finish(self) -> ModuleTypes
pub fn finish(self) -> ModuleTypes
Returns the result ModuleTypes
of this builder.
sourcepub fn wasm_signatures(
&self
) -> impl Iterator<Item = (SignatureIndex, &WasmFuncType)>
pub fn wasm_signatures( &self ) -> impl Iterator<Item = (SignatureIndex, &WasmFuncType)>
Returns an iterator over all the wasm function signatures found within this module.
Trait Implementations§
source§impl Default for ModuleTypesBuilder
impl Default for ModuleTypesBuilder
source§fn default() -> ModuleTypesBuilder
fn default() -> ModuleTypesBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ModuleTypesBuilder
impl RefUnwindSafe for ModuleTypesBuilder
impl Send for ModuleTypesBuilder
impl Sync for ModuleTypesBuilder
impl Unpin for ModuleTypesBuilder
impl UnwindSafe for ModuleTypesBuilder
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