[][src]Struct cranelift_codegen::cursor::FuncCursor

pub struct FuncCursor<'f> {
    pub func: &'f mut Function,
    // some fields omitted
}

Function cursor.

A FuncCursor holds a mutable reference to a whole ir::Function while keeping a position too. The function can be re-borrowed by accessing the public cur.func member.

This cursor is for use before legalization. The inserted instructions are not given an encoding.

Fields

func: &'f mut Function

The referenced function.

Methods

impl<'f> FuncCursor<'f>[src]

pub fn new(func: &'f mut Function) -> Self[src]

Create a new FuncCursor pointing nowhere.

pub fn use_srcloc(&mut self, inst: Inst)[src]

Use the source location of inst for future instructions.

pub fn ins(&mut self) -> InsertBuilder<&mut FuncCursor<'f>>[src]

Create an instruction builder that inserts an instruction at the current position.

Trait Implementations

impl<'f> Cursor for FuncCursor<'f>[src]

impl<'c, 'f> InstInserterBase<'c> for &'c mut FuncCursor<'f>[src]

Auto Trait Implementations

impl<'f> RefUnwindSafe for FuncCursor<'f>

impl<'f> Send for FuncCursor<'f>

impl<'f> Sync for FuncCursor<'f>

impl<'f> Unpin for FuncCursor<'f>

impl<'f> !UnwindSafe for FuncCursor<'f>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.