pub struct InputModule<'a> {Show 15 fields
pub types: IdVec<FuncType>,
pub imports: IdVec<Import<'a>>,
pub exports: IdVec<Export<'a>>,
pub tables: IdVec<Table<'a>>,
pub elements: IdVec<Element<'a>>,
pub tags: IdVec<TagType>,
pub globals: IdVec<Global<'a>>,
pub memories: IdVec<MemoryType>,
pub code: IndexedSection<CodeSection<'a>>,
pub data: IndexedSection<DataSection<'a>>,
pub names: Names<'a>,
pub linking: LinkingInfo<'a>,
pub relocs: Relocation,
pub target_features: TargetFeatures,
pub custom_sections: VecMap<IndexedSection<CustomSection<'a>>>,
}Expand description
Lossless representation of wasm module, without preprocessing That can pass round-trip test without any loss. After round-trip section will have canonical order.
Fields§
§types: IdVec<FuncType>§imports: IdVec<Import<'a>>§exports: IdVec<Export<'a>>§tables: IdVec<Table<'a>>§elements: IdVec<Element<'a>>§globals: IdVec<Global<'a>>§memories: IdVec<MemoryType>§code: IndexedSection<CodeSection<'a>>§data: IndexedSection<DataSection<'a>>§names: Names<'a>§linking: LinkingInfo<'a>§relocs: Relocation§target_features: TargetFeatures§custom_sections: VecMap<IndexedSection<CustomSection<'a>>>Implementations§
Source§impl<'a> InputModule<'a>
impl<'a> InputModule<'a>
pub fn parse(wasm: &'a [u8]) -> Result<Self>
pub fn defined_func_type_id( &self, id: Id<FunctionWithBody<'static>>, ) -> Id<FuncType>
Trait Implementations§
Source§impl<'a> Default for InputModule<'a>
impl<'a> Default for InputModule<'a>
Source§fn default() -> InputModule<'a>
fn default() -> InputModule<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> Freeze for InputModule<'a>
impl<'a> RefUnwindSafe for InputModule<'a>
impl<'a> Send for InputModule<'a>
impl<'a> Sync for InputModule<'a>
impl<'a> Unpin for InputModule<'a>
impl<'a> UnsafeUnpin for InputModule<'a>
impl<'a> UnwindSafe for InputModule<'a>
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