pub trait IteratingInstrumenter<'a>: Instrumenter<'a> + Iterator {
    // Required methods
    fn set_instrument_mode(&mut self, mode: InstrumentationMode);
    fn add_global(&mut self, global: Global) -> GlobalID;

    // Provided methods
    fn alternate(&mut self) -> &mut Self { ... }
    fn empty_alternate(&mut self) -> &mut Self { ... }
    fn before(&mut self) -> &mut Self { ... }
    fn after(&mut self) -> &mut Self { ... }
    fn semantic_after(&mut self) -> &mut Self { ... }
    fn block_entry(&mut self) -> &mut Self { ... }
    fn block_exit(&mut self) -> &mut Self { ... }
    fn block_alt(&mut self) -> &mut Self { ... }
    fn empty_block_alt(&mut self) -> &mut Self { ... }
}
Expand description

This trait coincides with the Iterator as instrumentation occurs during Wasm visitation. This trait enables code injection during traversal, thus the Iterator trait is required to be implemented on the structure to inject on. Instructions as defined here.

Required Methods§

source

fn set_instrument_mode(&mut self, mode: InstrumentationMode)

Sets the type of Instrumentation Type of the current location

source

fn add_global(&mut self, global: Global) -> GlobalID

Adds a global to the current module and returns the Global ID

Provided Methods§

source

fn alternate(&mut self) -> &mut Self

Mark the current location to InstrumentAlternate

source

fn empty_alternate(&mut self) -> &mut Self

Insert an empty alt at the current location Effectively removes the instruction

source

fn before(&mut self) -> &mut Self

Mark the current location to InstrumentBefore

source

fn after(&mut self) -> &mut Self

Mark the current location to InstrumentAfter

source

fn semantic_after(&mut self) -> &mut Self

Mark the current location to InstrumentSemanticAfter

source

fn block_entry(&mut self) -> &mut Self

Mark the current location to InstrumentBlockEntry

source

fn block_exit(&mut self) -> &mut Self

Mark the current location to InstrumentBlockExit

source

fn block_alt(&mut self) -> &mut Self

Mark the current location to InstrumentBlockAlt

source

fn empty_block_alt(&mut self) -> &mut Self

Insert an empty alt block at the current location Effectively removes the block

Object Safety§

This trait is not object safe.

Implementors§