pub struct Instruction { /* private fields */ }Expand description
A disassembled instruction with human-friendly fields.
This type stores the instruction address, mnemonic and operands as strings so callers can format or inspect them without depending on capstone types.
Implementations§
Source§impl Instruction
impl Instruction
Sourcepub fn new(insn: &Insn<'_>) -> Self
pub fn new(insn: &Insn<'_>) -> Self
Create an Instruction from a capstone Insn.
Converts a capstone Insn into the crate’s lightweight Instruction
representation by copying the instruction address, mnemonic and
operand string. This allows callers to own and format instruction
data without keeping capstone types around.
§Arguments
insn- A reference to a capstoneInsnto convert.
§Returns
An owned Instruction containing the address, mnemonic and operands
extracted from insn.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Instruction
impl RefUnwindSafe for Instruction
impl Send for Instruction
impl Sync for Instruction
impl Unpin for Instruction
impl UnsafeUnpin for Instruction
impl UnwindSafe for Instruction
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