[−][src]Struct binaryen::Module
Modules contain lists of functions, imports, exports, function types.
Methods
impl Module[src]
pub fn read(module: &[u8]) -> Result<Module, ()>[src]
Deserialize a module from binary form.
Returns Err if an invalid module is given.
pub unsafe fn from_raw(raw: BinaryenModuleRef) -> Module[src]
pub fn optimize(&self)[src]
Run the standard optimization passes on the module.
It will take into account code generation configuration set by set_global_codegen_config.
pub fn run_optimization_passes<B: AsRef<str>, I: IntoIterator<Item = B>>(
&self,
passes: I
) -> Result<(), ()>[src]
&self,
passes: I
) -> Result<(), ()>
Run a specified set of optimization passes on the module.
This WILL NOT take into account code generation configuration set by set_global_codegen_config.
pub fn write(&self) -> Vec<u8>[src]
Serialize a module into binary form.
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,