Skip to main content

InstrRead

Trait InstrRead 

Source
pub trait InstrRead {
    // Required method
    fn read<T>(
        &self,
        find: impl FnMut(&Instr, (usize, InstrSeqId)) -> T,
    ) -> Result<Vec<T>>;
}
Expand description

Trait for reading instructions sequentially in a local function without modifying them.

Required Methods§

Source

fn read<T>( &self, find: impl FnMut(&Instr, (usize, InstrSeqId)) -> T, ) -> Result<Vec<T>>

Reads and iterates over instructions using a callback, tracking sequence IDs.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl InstrRead for LocalFunction

Source§

fn read<T>( &self, find: impl FnMut(&Instr, (usize, InstrSeqId)) -> T, ) -> Result<Vec<T>>

Implementors§