[−][src]Struct cranelift_codegen_meta::cdsl::operands::Operand
An instruction operand can be an immediate, an SSA value, or an entity reference. The type of the operand is one of:
-
A
ValueTypeinstance indicates an SSA value operand with a concrete type. -
A
TypeVarinstance indicates an SSA value operand, and the instruction is polymorphic over the possible concrete types that the type variable can assume. -
An
ImmediateKindinstance indicates an immediate operand whose value is encoded in the instruction itself rather than being passed as an SSA value. -
An
EntityRefKindinstance indicates an operand that references another entity in the function, typically something declared in the function preamble.
Fields
name: &'static strName of the operand variable, as it appears in function parameters, legalizations, etc.
kind: OperandKindType of the operand.
doc: Option<&'static str>Methods
impl Operand[src]
pub fn new(name: &'static str, kind: impl Into<OperandKind>) -> Self[src]
pub fn with_doc(self, doc: &'static str) -> Self[src]
pub fn doc(&self) -> Option<&str>[src]
pub fn is_value(&self) -> bool[src]
pub fn type_var(&self) -> Option<&TypeVar>[src]
pub fn is_varargs(&self) -> bool[src]
pub fn is_immediate_or_entityref(&self) -> bool[src]
Returns true if the operand has an immediate kind or is an EntityRef.
pub fn is_immediate(&self) -> bool[src]
Returns true if the operand has an immediate kind.
pub fn is_cpu_flags(&self) -> bool[src]
Trait Implementations
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
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,