Trait lde::Isa
[−]
[src]
pub trait Isa: Sized { type Va: Va; fn ld(bytes: &[u8]) -> u32; fn peek(bytes: &[u8]) -> Option<&OpCode> { ... } fn peek_mut(bytes: &mut [u8]) -> Option<&mut OpCode> { ... } fn iter<'a>(bytes: &'a [u8], va: Self::Va) -> Iter<'a, Self> { ... } fn iter_mut<'a>(bytes: &'a mut [u8], va: Self::Va) -> IterMut<'a, Self> { ... } }
Instruction set architecture.
Defines the entry points for the length disassembler.
Associated Types
Required Methods
fn ld(bytes: &[u8]) -> u32
Returns the length of the first opcode in the given byte slice.
When length disassembling fails, eg. the byte slice does not contain a complete and valid instruction, the return value is 0
.
Provided Methods
fn peek(bytes: &[u8]) -> Option<&OpCode>
Returns the first opcode in the byte slice if successful.
fn peek_mut(bytes: &mut [u8]) -> Option<&mut OpCode>
Returns the first opcode mutably in the byte slice if successful.
ⓘImportant traits for Iter<'a, X>
fn iter<'a>(bytes: &'a [u8], va: Self::Va) -> Iter<'a, Self>
Returns an iterator over the opcodes contained in the byte slice.
Given a virtual address to keep track of the instruction pointer.
ⓘImportant traits for IterMut<'a, X>
fn iter_mut<'a>(bytes: &'a mut [u8], va: Self::Va) -> IterMut<'a, Self>
Returns an iterator over the opcodes contained in the byte slice.
Given a virtual address to keep track of the instruction pointer.