[][src]Struct xori::disasm::Xori

pub struct Xori {
    pub arch: Arch,
    pub mode: Mode,
}

Fields

Methods

impl Xori
[src]

Set up the architecture type for the disassembler type and prepares the returned instruction container.

Example:

This example is not tested
let xi = Xori { arch: Arch::ArchX86, mode: Mode::Mode32 };
let binary32 = b"\xe9\x1e\x00\x00\x00\xb8\x04\
\x00\x00\x00\xbb\x01\x00\x00\x00\x59\xba\x0f\
\x00\x00\x00\xcd\x80\xb8\x01\x00\x00\x00\xbb\
\x00\x00\x00\x00\xcd\x80\xe8\xdd\xff\xff\xff\
\x48\x65\x6c\x6c\x6f\x2c\x20\x57\x6f\x72\x6c\
\x64\x21\x0d\x0a";
let mut vec: Vec<Instruction<X86Detail>> = Vec::new();
let start_address = 0x1000;
xi.disasm(binary32, binary32.len(), start_address, start_address, 0, &mut vec);
if vec.len() > 0
{
    for instr in vec.iter_mut()
    {
        let addr: String = format!("0x{:x}", instr.address);
        println!("{:16}{} {}", addr, instr.mnemonic, instr.op_str);
    }
}

Auto Trait Implementations

impl Send for Xori

impl Sync for Xori

Blanket Implementations

impl<T> From for T
[src]

Performs the conversion.

impl<T, U> Into for T where
    U: From<T>, 
[src]

Performs the conversion.

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> Borrow for T where
    T: ?Sized
[src]

Immutably borrows from an owned value. Read more

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> BorrowMut for T where
    T: ?Sized
[src]

Mutably borrows from an owned value. Read more

impl<T> Any for T where
    T: 'static + ?Sized
[src]

🔬 This is a nightly-only experimental API. (get_type_id)

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more