Struct capstone_rust::capstone::InstrBuf
[−]
[src]
pub struct InstrBuf { /* fields omitted */ }
Buffer of disassembled instructions.
Provides a Rust-friendly interface to read the buffer of instructions disassembled by Capstone.
Methods
impl InstrBuf
[src]
pub fn new(
insn: *mut cs_insn,
count: usize,
decode_detail: bool,
arch: cs_arch
) -> InstrBuf
[src]
insn: *mut cs_insn,
count: usize,
decode_detail: bool,
arch: cs_arch
) -> InstrBuf
Create an InstrBuf
from a pointer to a cs_insn buffer. count
is the number of
instructions in insn
. decode_detail
states if details are available for the
instructions in insn
, if true Instr
created by get
will have Details
. arch
is the
architecture to use to interpret the arch-specific part of cs_detail.
pub fn count(&self) -> usize
[src]
Get the number of instructions in this buffer.
pub fn get(&self, index: usize) -> Option<Instr>
[src]
Get the instruction at the requested index.
ⓘImportant traits for InstrIter<'a>pub fn iter(&self) -> InstrIter
[src]
ⓘImportant traits for InstrIter<'a>
Create an iterator from the beginning of this buffer.