#[repr(C)]
pub struct cs_opt_skipdata { pub mnemonic: *const c_char, pub callback: cs_skipdata_cb_t, pub user_data: *mut c_void, }
Expand description

User-customized setup for SKIPDATA option

Fields§

§mnemonic: *const c_char

Capstone considers data to skip as special “instructions”. User can specify the string for this instruction’s “mnemonic” here. By default (if @mnemonic is NULL), Capstone use “.byte”.

§callback: cs_skipdata_cb_t

User-defined callback function to be called when Capstone hits data. If the returned value from this callback is positive (>0), Capstone will skip exactly that number of bytes & continue. Otherwise, if the callback returns 0, Capstone stops disassembling and returns immediately from cs_disasm() NOTE: if this callback pointer is NULL, Capstone would skip a number of bytes depending on architectures, as following: Arm: 2 bytes (Thumb mode) or 4 bytes. Arm64: 4 bytes. Mips: 4 bytes. M680x: 1 byte. PowerPC: 4 bytes. Sparc: 4 bytes. SystemZ: 2 bytes. X86: 1 bytes. XCore: 2 bytes. EVM: 1 bytes. RISCV: 4 bytes. WASM: 1 bytes. MOS65XX: 1 bytes. BPF: 8 bytes.

§user_data: *mut c_void

User-defined data to be passed to @callback function pointer.

Trait Implementations§

source§

impl Clone for cs_opt_skipdata

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for cs_opt_skipdata

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Copy for cs_opt_skipdata

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.