Struct haybale::callbacks::Callbacks [−][src]
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]
&mut self,
cb: impl Fn(&'p Instruction, &State<'_, B>) -> Result<()> + 'p
)
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]
&mut self,
cb: impl Fn(&'p Terminator, &State<'_, B>) -> Result<()> + 'p
)
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,