pub struct Module { /* private fields */ }
Expand description
WebAssembly module.
Implementations§
Source§impl Module
impl Module
Sourcepub fn parse_wat<S: AsRef<[u8]>>(
filename: &str,
source: S,
features: Features,
) -> Result<Module, Error>
pub fn parse_wat<S: AsRef<[u8]>>( filename: &str, source: S, features: Features, ) -> Result<Module, Error>
Parse source in WebAssembly text format.
Sourcepub fn read_binary<S: AsRef<[u8]>>(
wasm: S,
options: &ReadBinaryOptions,
) -> Result<Module, Error>
pub fn read_binary<S: AsRef<[u8]>>( wasm: S, options: &ReadBinaryOptions, ) -> Result<Module, Error>
Read WebAssembly binary.
read_binary
doesn’t do any validation. If you want to validate, you can the module you can
call validate
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Module
impl RefUnwindSafe for Module
impl !Send for Module
impl !Sync for Module
impl Unpin for Module
impl UnwindSafe for Module
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