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§
source§impl<'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> Freeze for ModuleEnvironment<'data>
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§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.
source§impl<T> Upcastable for T
impl<T> Upcastable for T
source§fn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
upcast ref
source§fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
upcast mut ref