Trait spirq::inspect::Inspector

source ·
pub trait Inspector {
    // Required method
    fn inspect<'a>(
        &mut self,
        itm: &mut ReflectIntermediate<'a>,
        instr: &Instr
    ) -> Result<()>;

    // Provided method
    fn chain<'a, I2: Inspector>(
        &'a mut self,
        second: &'a mut I2
    ) -> Chain<'_, Self, I2>
       where Self: Sized { ... }
}

Required Methods§

source

fn inspect<'a>( &mut self, itm: &mut ReflectIntermediate<'a>, instr: &Instr ) -> Result<()>

For each instruction iterated in a function parse, the inspector receive the instruction after the reflector finishes processing it.

Provided Methods§

source

fn chain<'a, I2: Inspector>( &'a mut self, second: &'a mut I2 ) -> Chain<'_, Self, I2>
where Self: Sized,

Chain two inspectors together. The second inspector will be called after the first one.

Implementors§