Skip to main content

Options

Struct Options 

Source
#[non_exhaustive]
pub struct Options { pub header: bool, pub numbering: bool, pub offsets: bool, pub hex_literals: bool, pub debug_info: bool, }
Expand description

How the listing is written: the switches of Microsoft’s D3D_DISASM_* flags that this disassembler writes. Options::default is D3DDisassemble with no flags.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§header: bool

The comment block before the program and the instruction count after it; off, only the program’s lines (D3D_DISASM_INSTRUCTION_ONLY, 0x40).

§numbering: bool

Each instruction after its number, 12:, other lines after as many spaces; before an offset, 12 (D3D_DISASM_ENABLE_INSTRUCTION_NUMBERING, 0x04).

§offsets: bool

Each line after the byte offset of its token in the program, 0x0000001C: , after the number (D3D_DISASM_ENABLE_INSTRUCTION_OFFSET, 0x20).

§hex_literals: bool

Every 32-bit value as eight hex digits, l(0x3f800000) (D3D_DISASM_PRINT_HEX_LITERALS, 0x80).

§debug_info: bool

A /Zi build’s source lines and variable locations: from the SPDB part, #line lines, the variables’ initial locations before the first instruction with a line, and after an instruction the locations that start at the next; from a feature level 9 container’s Direct3D 9 program, its own (cleared by D3D_DISASM_DISABLE_DEBUG_INFO, 0x10).

Implementations§

Source§

impl Options

Source

pub fn from_flags(flags: u32) -> Result<Self>

The options of a D3D_DISASM_* flags word. D3D_DISASM_ENABLE_DEFAULT_VALUE_PRINTS (0x02) changes nothing (the default values are written either way). Refuses D3D_DISASM_ENABLE_COLOR_CODE (0x01, an HTML listing), D3D_DISASM_ENABLE_INSTRUCTION_CYCLE (0x08, which Microsoft’s disassembler refuses too) and bits it does not define, naming the bit.

Trait Implementations§

Source§

impl Clone for Options

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for Options

Source§

impl Debug for Options

Source§

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

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

impl Default for Options

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for Options

Source§

impl PartialEq for Options

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Options

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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.