pub struct RirFunctionView<'a> { /* private fields */ }Expand description
A view into a function’s instructions within the RIR.
This provides a way to iterate over just the instructions belonging to a specific function, enabling per-function analysis without copying data.
Implementations§
Source§impl<'a> RirFunctionView<'a>
impl<'a> RirFunctionView<'a>
Sourcepub fn get(&self, inst_ref: InstRef) -> &'a Inst
pub fn get(&self, inst_ref: InstRef) -> &'a Inst
Get the instruction at the given reference.
Note: The reference must be within this function’s range.
Sourcepub fn iter(&self) -> impl Iterator<Item = (InstRef, &'a Inst)>
pub fn iter(&self) -> impl Iterator<Item = (InstRef, &'a Inst)>
Iterate over all instructions in this function (including FnDecl).
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for RirFunctionView<'a>
impl<'a> RefUnwindSafe for RirFunctionView<'a>
impl<'a> Send for RirFunctionView<'a>
impl<'a> Sync for RirFunctionView<'a>
impl<'a> Unpin for RirFunctionView<'a>
impl<'a> UnwindSafe for RirFunctionView<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more