pub struct TranslationBlock<'a> { /* private fields */ }
Expand description
Wrapper structure for a qemu_plugin_tb *
§Safety
This structure is safe to use as long as the pointer is valid. The pointer is always opaque, and therefore may not be dereferenced.
Implementations§
Source§impl<'a> TranslationBlock<'a>
impl<'a> TranslationBlock<'a>
Sourcepub fn instruction(&'a self, index: usize) -> Result<Instruction<'a>>
pub fn instruction(&'a self, index: usize) -> Result<Instruction<'a>>
Returns the instruction in the translation block at index
. If the index is out of bounds,
an error is returned.
§Arguments
index
: The index of the instruction to return
Sourcepub fn instructions(&'a self) -> TranslationBlockIterator<'a> ⓘ
pub fn instructions(&'a self) -> TranslationBlockIterator<'a> ⓘ
Returns an iterator over the instructions in the translation block
Sourcepub fn register_execute_callback<F>(&self, cb: F)
pub fn register_execute_callback<F>(&self, cb: F)
Register a callback to be run on execution of this translation block
Sourcepub fn register_execute_callback_flags<F>(&self, cb: F, flags: CallbackFlags)
pub fn register_execute_callback_flags<F>(&self, cb: F, flags: CallbackFlags)
Register a callback to be run on execution of this translation block
Trait Implementations§
Source§impl<'a> From<*mut qemu_plugin_tb> for TranslationBlock<'a>
impl<'a> From<*mut qemu_plugin_tb> for TranslationBlock<'a>
Source§fn from(tb: *mut qemu_plugin_tb) -> Self
fn from(tb: *mut qemu_plugin_tb) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a> Freeze for TranslationBlock<'a>
impl<'a> RefUnwindSafe for TranslationBlock<'a>
impl<'a> Send for TranslationBlock<'a>
impl<'a> Sync for TranslationBlock<'a>
impl<'a> Unpin for TranslationBlock<'a>
impl<'a> UnwindSafe for TranslationBlock<'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