pub(crate) struct Operand {
    pub name: &'static str,
    pub kind: OperandKind,
    doc: Option<&'static str>,
}
Expand description

An instruction operand can be an immediate, an SSA value, or an entity reference. The type of the operand is one of:

  1. A ValueType instance indicates an SSA value operand with a concrete type.

  2. A TypeVar instance indicates an SSA value operand, and the instruction is polymorphic over the possible concrete types that the type variable can assume.

  3. An ImmediateKind instance indicates an immediate operand whose value is encoded in the instruction itself rather than being passed as an SSA value.

  4. An EntityRefKind instance indicates an operand that references another entity in the function, typically something declared in the function preamble.

Fields§

§name: &'static str

Name of the operand variable, as it appears in function parameters, legalizations, etc.

§kind: OperandKind

Type of the operand.

§doc: Option<&'static str>

Implementations§

Returns true if the operand has an immediate kind or is an EntityRef.

Returns true if the operand has an immediate kind.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

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 resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
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.