Struct wasmer_compiler::ModuleEnvironment
source · [−]pub struct ModuleEnvironment<'data> {
pub module: ModuleInfo,
pub function_body_inputs: PrimaryMap<LocalFunctionIndex, FunctionBodyData<'data>>,
pub data_initializers: Vec<DataInitializer<'data>>,
pub module_translation_state: Option<ModuleTranslationState>,
}
Expand description
The result of translating via ModuleEnvironment
. Function bodies are not
yet translated, and data initializers have not yet been copied out of the
original buffer.
The function bodies will be translated by a specific compiler backend.
Fields
module: ModuleInfo
ModuleInfo information.
function_body_inputs: PrimaryMap<LocalFunctionIndex, FunctionBodyData<'data>>
References to the function bodies.
data_initializers: Vec<DataInitializer<'data>>
References to the data initializers.
module_translation_state: Option<ModuleTranslationState>
The decoded Wasm types for the module.
Implementations
sourceimpl<'data> ModuleEnvironment<'data>
impl<'data> ModuleEnvironment<'data>
sourcepub fn translate(
self,
data: &'data [u8]
) -> WasmResult<ModuleEnvironment<'data>>
pub fn translate(
self,
data: &'data [u8]
) -> WasmResult<ModuleEnvironment<'data>>
Translate a wasm module using this environment. This consumes the
ModuleEnvironment
and produces a ModuleInfoTranslation
.
Auto Trait Implementations
impl<'data> RefUnwindSafe for ModuleEnvironment<'data>
impl<'data> Send for ModuleEnvironment<'data>
impl<'data> Sync for ModuleEnvironment<'data>
impl<'data> Unpin for ModuleEnvironment<'data>
impl<'data> UnwindSafe for ModuleEnvironment<'data>
Blanket Implementations
sourceimpl<T> ArchivePointee for T
impl<T> ArchivePointee for T
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
sourcepub fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
pub fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more