Struct wasmtime_environ::ModuleEnvironment
source · [−]pub struct ModuleEnvironment<'a, 'data> { /* private fields */ }Expand description
Object containing the standalone environment information.
Implementations
sourceimpl<'a, 'data> ModuleEnvironment<'a, 'data>
impl<'a, 'data> ModuleEnvironment<'a, 'data>
sourcepub fn new(
tunables: &'a Tunables,
validator: &'a mut Validator,
types: &'a mut ModuleTypesBuilder
) -> Self
pub fn new(
tunables: &'a Tunables,
validator: &'a mut Validator,
types: &'a mut ModuleTypesBuilder
) -> Self
Allocates the environment data structures.
sourcepub fn translate(
self,
parser: Parser,
data: &'data [u8]
) -> WasmResult<ModuleTranslation<'data>>
pub fn translate(
self,
parser: Parser,
data: &'data [u8]
) -> WasmResult<ModuleTranslation<'data>>
Translate a wasm module using this environment.
This function will translate the data provided with parser,
validating everything along the way with this environment’s validator.
The result of translation, ModuleTranslation, contains everything
necessary to compile functions afterwards as well as learn type
information about the module at runtime.
Auto Trait Implementations
impl<'a, 'data> RefUnwindSafe for ModuleEnvironment<'a, 'data>
impl<'a, 'data> Send for ModuleEnvironment<'a, 'data>
impl<'a, 'data> Sync for ModuleEnvironment<'a, 'data>
impl<'a, 'data> Unpin for ModuleEnvironment<'a, 'data>
impl<'a, 'data> !UnwindSafe for ModuleEnvironment<'a, 'data>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more