pub struct Format {
pub name: String,
pub operands: Vec<Operand>,
pub eflags: Eflags,
}
Expand description
A format describes the operands for an instruction.
Fields§
§name: String
This name, when combined with the instruction mnemonic, uniquely identifies an instruction. The reference manual uses this name in the “Instruction Operand Encoding” table.
operands: Vec<Operand>
These operands should match the “Instruction” column in the reference manual.
eflags: Eflags
This should match eflags description of an instruction.
Implementations§
Source§impl Format
impl Format
Sourcepub fn locations(&self) -> impl Iterator<Item = &Location> + '_
pub fn locations(&self) -> impl Iterator<Item = &Location> + '_
Iterate over the operand locations.
Sourcepub fn uses_memory(&self) -> Option<Location>
pub fn uses_memory(&self) -> Option<Location>
Return the location of the operand that uses memory, if any; return
None
otherwise.
Sourcepub fn uses_register(&self) -> bool
pub fn uses_register(&self) -> bool
Return true
if any of the operands accepts a register (i.e., not an
immediate); return false
otherwise.
Sourcepub fn operands_by_kind(&self) -> Vec<OperandKind>
pub fn operands_by_kind(&self) -> Vec<OperandKind>
Collect into operand kinds.
Sourcepub fn uses_eflags(&self) -> bool
pub fn uses_eflags(&self) -> bool
Return true if an instruction uses EFLAGS.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Format
impl RefUnwindSafe for Format
impl Send for Format
impl Sync for Format
impl Unpin for Format
impl UnwindSafe for Format
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