pub struct Keystone { /* private fields */ }
Expand description
Reprensents a Keystone instance.
Implementations§
Source§impl Keystone
impl Keystone
pub fn version() -> (u32, u32)
Sourcepub fn option(&self, opt_type: OptionType, value: OptionValue) -> Result<()>
pub fn option(&self, opt_type: OptionType, value: OptionValue) -> Result<()>
Sets an option of the Keystone engine after the instance has been created.
Sourcepub fn asm(&self, insns: String, address: u64) -> Result<KeystoneOutput>
pub fn asm(&self, insns: String, address: u64) -> Result<KeystoneOutput>
Assembles a program from an input string containing assembly instructions.
The resulting machine code depends on the input buffer, its size, a base address and the
number of instructions to encode. The method returns a KeystoneOutput
object that
contains the encoded instructions.
Trait Implementations§
Source§impl Ord for Keystone
impl Ord for Keystone
Source§impl PartialOrd for Keystone
impl PartialOrd for Keystone
impl Eq for Keystone
impl StructuralPartialEq for Keystone
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