pub struct InstructionBuilder { /* private fields */ }
Expand description

Creates an Instruction object step by step.

Implementations§

Creates an InstructionBuilder object with an instruction with no operands and no comment.

Follows the instruction’s mnemonic with operands.

Example
let instruction = InstructionBuilder::new(Mov)
    .with_operands(&[Register::Rax, Register::Rbx])
    .create();

Follows the instruction with a comment.

Example
let instruction = InstructionBuilder::new(Mov)
    .with_comment("Mov instruction")
    .create();

Finishes building the instruction.

Returns an Instruction object, which is the private field self.instruction of this structure.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.