Struct haybale::callbacks::Callbacks[][src]

pub struct Callbacks<'p, B: Backend> { /* fields omitted */ }

Implementations

impl<'p, B: Backend> Callbacks<'p, B>[src]

pub fn add_instruction_callback(
    &mut self,
    cb: impl Fn(&'p Instruction, &State<'_, B>) -> Result<()> + 'p
)
[src]

Add an instruction callback. haybale will call the provided function before processing each LLVM non-terminator instruction.

If multiple instruction callbacks are added (by calling this function multiple times), haybale will call each of them before processing each instruction.

If any callback returns an Err, haybale will propagate it accordingly.

pub fn add_terminator_callback(
    &mut self,
    cb: impl Fn(&'p Terminator, &State<'_, B>) -> Result<()> + 'p
)
[src]

Add a terminator callback. haybale will call the provided function before processing each LLVM terminator instruction.

If multiple terminator callbacks are added (by calling this function multiple times), haybale will call each of them before processing each terminator.

If any callback returns an Err, haybale will propagate it accordingly.

Trait Implementations

impl<'p, B: Clone + Backend> Clone for Callbacks<'p, B>[src]

impl<'p, B: Backend> Default for Callbacks<'p, B>[src]

Auto Trait Implementations

impl<'p, B> !RefUnwindSafe for Callbacks<'p, B>[src]

impl<'p, B> !Send for Callbacks<'p, B>[src]

impl<'p, B> !Sync for Callbacks<'p, B>[src]

impl<'p, B> Unpin for Callbacks<'p, B>[src]

impl<'p, B> !UnwindSafe for Callbacks<'p, B>[src]

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.