pub struct Parser { /* private fields */ }Expand description
A light wrapper around capstone used to disassemble buffers.
Implementations§
Source§impl Parser
impl Parser
Sourcepub fn new() -> Result<Self>
pub fn new() -> Result<Self>
Create a new instruction Parser for the host architecture (x86_64).
§Errors
Returns an error if the underlying capstone builder fails.
Sourcepub fn get_instruction_from(
&self,
opcode: &[u8],
addr: u64,
) -> Result<Instruction>
pub fn get_instruction_from( &self, opcode: &[u8], addr: u64, ) -> Result<Instruction>
Sourcepub fn get_all_instructions_from(
&self,
code: &[u8],
addr: u64,
) -> Result<Vec<Instruction>>
pub fn get_all_instructions_from( &self, code: &[u8], addr: u64, ) -> Result<Vec<Instruction>>
Auto Trait Implementations§
impl Freeze for Parser
impl RefUnwindSafe for Parser
impl !Send for Parser
impl !Sync for Parser
impl Unpin for Parser
impl UnsafeUnpin for Parser
impl UnwindSafe for Parser
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