Skip to main content

RegModule

Struct RegModule 

Source
pub struct RegModule {
Show 17 fields pub funcs: Vec<RegFunc>, pub exports: Vec<RegExport>, pub imported_func_count: u32, pub imported_funcs: Vec<RegImport>, pub imported_memories: Vec<RegMemoryImport>, pub imported_globals: Vec<RegGlobalImport>, pub imported_tables: Vec<RegTableImport>, pub start: Option<FuncIdx>, pub memories: Vec<MemType>, pub globals: Vec<RegGlobal>, pub tables: Vec<TableType>, pub elements: Vec<RegElement>, pub types: Vec<FuncType>, pub data: Vec<RegDataSegment>, pub imported_memory_count: u32, pub imported_global_count: u32, pub imported_table_count: u32,
}
Expand description

A validated module lowered into register IR.

Fields§

§funcs: Vec<RegFunc>§exports: Vec<RegExport>§imported_func_count: u32

Number of imported functions: FuncIdx values below this are not lowered and cannot be called by the interpreter yet.

§imported_funcs: Vec<RegImport>

Function import declarations in index order (for host-function registration and lazy import resolution).

§imported_memories: Vec<RegMemoryImport>

Memory import declarations in index order.

§imported_globals: Vec<RegGlobalImport>

Global import declarations in index order.

§imported_tables: Vec<RegTableImport>

Table import declarations in index order.

§start: Option<FuncIdx>

The start function, if the module declares one.

§memories: Vec<MemType>

Defined memories (instantiated as zeroed linear memory).

§globals: Vec<RegGlobal>

Defined globals, initialized in declaration order at instantiation.

§tables: Vec<TableType>

Defined tables (instantiated as null-filled reference arrays).

§elements: Vec<RegElement>

Element segments in index order; mode decides instantiation behavior.

§types: Vec<FuncType>

All function types in the module’s type section, for structural call_indirect type checks.

§data: Vec<RegDataSegment>

All data segments in index order; mode decides instantiation behavior.

§imported_memory_count: u32

Number of imported memories (runtime access is not yet supported).

§imported_global_count: u32

Number of imported globals (runtime access is not yet supported).

§imported_table_count: u32

Number of imported tables (runtime access is not yet supported).

Trait Implementations§

Source§

impl Clone for RegModule

Source§

fn clone(&self) -> RegModule

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RegModule

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for RegModule

Source§

fn eq(&self, other: &RegModule) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for RegModule

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.