pub struct Module<'a> {
pub orig_bytes: &'a [u8],
pub funcs: EntityVec<Func, FuncDecl<'a>>,
pub signatures: EntityVec<Signature, SignatureData>,
pub globals: EntityVec<Global, GlobalData>,
pub tables: EntityVec<Table, TableData>,
pub imports: Vec<Import>,
pub exports: Vec<Export>,
pub memories: EntityVec<Memory, MemoryData>,
pub start_func: Option<Func>,
pub debug: Debug,
pub debug_map: DebugMap,
}
Fields§
§orig_bytes: &'a [u8]
§funcs: EntityVec<Func, FuncDecl<'a>>
§signatures: EntityVec<Signature, SignatureData>
§globals: EntityVec<Global, GlobalData>
§tables: EntityVec<Table, TableData>
§imports: Vec<Import>
§exports: Vec<Export>
§memories: EntityVec<Memory, MemoryData>
§start_func: Option<Func>
§debug: Debug
§debug_map: DebugMap
Implementations§
source§impl<'a> Module<'a>
impl<'a> Module<'a>
pub fn from_wasm_bytes( bytes: &'a [u8], options: &FrontendOptions ) -> Result<Self>
pub fn to_wasm_bytes(&self) -> Result<Vec<u8>>
pub fn per_func_body<F: Fn(&mut FunctionBody)>(&mut self, f: F)
pub fn expand_func<'b>(&'b mut self, id: Func) -> Result<&'b mut FuncDecl<'a>>
pub fn clone_and_expand_body(&self, id: Func) -> Result<FunctionBody>
pub fn replace_body(&mut self, id: Func, body: FunctionBody)
pub fn expand_all_funcs(&mut self) -> Result<()>
pub fn display<'b>(&'b self) -> ModuleDisplay<'b>where
'b: 'a,
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Module<'a>
impl<'a> RefUnwindSafe for Module<'a>
impl<'a> Send for Module<'a>
impl<'a> Sync for Module<'a>
impl<'a> Unpin for Module<'a>
impl<'a> UnwindSafe for Module<'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