pub trait Hook {
// Required methods
fn sites(&mut self, block: &BlockView<'_>) -> Vec<Site>;
fn instrument(&mut self, site: &Site, emit: &mut Emitter<'_>);
}Expand description
A rewrite of lifted code at chosen sites. See the module docs.
Required Methods§
Sourcefn sites(&mut self, block: &BlockView<'_>) -> Vec<Site>
fn sites(&mut self, block: &BlockView<'_>) -> Vec<Site>
The sites in block to instrument. Returned in block order; a hook
that instruments none returns an empty list.
Sourcefn instrument(&mut self, site: &Site, emit: &mut Emitter<'_>)
fn instrument(&mut self, site: &Site, emit: &mut Emitter<'_>)
Emits the hook’s code at site.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".