pub struct InstrumentationBuilder<'a, R, GetRulesFn>{ /* private fields */ }
Expand description
This is an auxiliary builder that allows to instrument WASM module.
Implementations§
Source§impl<'a, R, GetRulesFn> InstrumentationBuilder<'a, R, GetRulesFn>
impl<'a, R, GetRulesFn> InstrumentationBuilder<'a, R, GetRulesFn>
Sourcepub fn new(module_name: &'a str) -> Self
pub fn new(module_name: &'a str) -> Self
Creates a new InstrumentationBuilder
with the given module name to
import syscalls.
Sourcepub fn with_stack_limiter(
&mut self,
stack_limit: u32,
export_stack_height: bool,
) -> &mut Self
pub fn with_stack_limiter( &mut self, stack_limit: u32, export_stack_height: bool, ) -> &mut Self
Whether to insert a stack limiter into WASM module.
Sourcepub fn with_gas_limiter(&mut self, get_gas_rules: GetRulesFn) -> &mut Self
pub fn with_gas_limiter(&mut self, get_gas_rules: GetRulesFn) -> &mut Self
Whether to insert a gas limiter into WASM module.
Sourcepub fn instrument(
&mut self,
module: Module,
) -> Result<Module, InstrumentationError>
pub fn instrument( &mut self, module: Module, ) -> Result<Module, InstrumentationError>
Performs instrumentation of a given WASM module depending
on the parameters with which the InstrumentationBuilder
was created.
Auto Trait Implementations§
impl<'a, R, GetRulesFn> Freeze for InstrumentationBuilder<'a, R, GetRulesFn>where
GetRulesFn: Freeze,
impl<'a, R, GetRulesFn> RefUnwindSafe for InstrumentationBuilder<'a, R, GetRulesFn>where
GetRulesFn: RefUnwindSafe,
impl<'a, R, GetRulesFn> Send for InstrumentationBuilder<'a, R, GetRulesFn>where
GetRulesFn: Send,
impl<'a, R, GetRulesFn> Sync for InstrumentationBuilder<'a, R, GetRulesFn>where
GetRulesFn: Sync,
impl<'a, R, GetRulesFn> Unpin for InstrumentationBuilder<'a, R, GetRulesFn>where
GetRulesFn: Unpin,
impl<'a, R, GetRulesFn> UnwindSafe for InstrumentationBuilder<'a, R, GetRulesFn>where
GetRulesFn: UnwindSafe,
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