Skip to main content

CodeInjector

Trait CodeInjector 

Source
pub trait CodeInjector {
    // Required method
    fn inject(&mut self, ctx: &mut Context<'static>, block: BlockId);
}
Expand description

Edits a block before it runs. See the module documentation.

Required Methods§

Source

fn inject(&mut self, ctx: &mut Context<'static>, block: BlockId)

Rewrites block, which is lifted, cleaned and about to be entered. Must leave the block terminated, and must be idempotent.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§