pub struct Keystone { /* private fields */ }
Implementations§
Source§impl Keystone
impl Keystone
Sourcepub fn new(arch: Arch, mode: Mode) -> Result<Keystone, Error>
pub fn new(arch: Arch, mode: Mode) -> Result<Keystone, Error>
Create new instance of Keystone engine.
Sourcepub fn option(
&self,
option_type: OptionType,
value: OptionValue,
) -> Result<(), Error>
pub fn option( &self, option_type: OptionType, value: OptionValue, ) -> Result<(), Error>
Set option for Keystone engine at runtime
Sourcepub fn asm(&self, str: String, address: u64) -> Result<AsmResult, Error>
pub fn asm(&self, str: String, address: u64) -> Result<AsmResult, Error>
Assemble a string given its the buffer, size, start address and number of instructions to be decoded.
This API dynamically allocate memory to contain assembled instruction. Resulted array of bytes containing the machine code is put into @*encoding
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Keystone
impl RefUnwindSafe for Keystone
impl !Send for Keystone
impl !Sync for Keystone
impl Unpin for Keystone
impl UnwindSafe for Keystone
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