pub enum Operand {
Imm(u64),
Mem(MemOperand),
Ptr(PtrOperand),
Reg(Register),
}Expand description
an operand.
Variants§
Imm(u64)
an immediate operand.
Mem(MemOperand)
a memory operand, for example [rbp+2*rsi+0x35].
Ptr(PtrOperand)
a pointer operand, for example 0x10:0x1234.
Reg(Register)
a register operand.
Implementations§
source§impl Operand
impl Operand
pub fn as_imm(&self) -> Option<u64>
pub fn as_imm_mut(&mut self) -> Option<&mut u64>
pub fn as_mem(&self) -> Option<&MemOperand>
pub fn as_mem_mut(&mut self) -> Option<&mut MemOperand>
pub fn as_ptr(&self) -> Option<&PtrOperand>
pub fn as_ptr_mut(&mut self) -> Option<&mut PtrOperand>
pub fn as_reg(&self) -> Option<Register>
pub fn as_reg_mut(&mut self) -> Option<&mut Register>
Trait Implementations§
source§impl PartialEq for Operand
impl PartialEq for Operand
impl Eq for Operand
impl StructuralEq for Operand
impl StructuralPartialEq for Operand
Auto Trait Implementations§
impl RefUnwindSafe for Operand
impl Send for Operand
impl Sync for Operand
impl Unpin for Operand
impl UnwindSafe for Operand
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