Enum capstone_rust::capstone::InstrIdArch [] [src]

pub enum InstrIdArch {
    X86(x86_insn),
    ARM64(arm64_insn),
    ARM(arm_insn),
    MIPS(mips_insn),
    PPC(ppc_insn),
    SPARC(sparc_insn),
    SYSZ(sysz_insn),
    XCORE(xcore_insn),
}

Architecture-specific instruction id.

Examples

use capstone_rust::capstone as cs;
let code = vec![0x01, 0xc3]; // add ebx, eax

let dec = cs::Capstone::new(cs::cs_arch::CS_ARCH_X86, cs::cs_mode::CS_MODE_32).unwrap();

let buf = dec.disasm(code.as_slice(), 0, 0).unwrap();
let add = buf.get(0).unwrap();
if let cs::InstrIdArch::X86(insn) = add.id {
    assert_eq!(insn, cs::x86_insn::X86_INS_ADD);
}

Variants

Trait Implementations

impl Debug for InstrIdArch
[src]

[src]

Formats the value using the given formatter. Read more

impl PartialEq for InstrIdArch
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

Auto Trait Implementations

impl Send for InstrIdArch

impl Sync for InstrIdArch