[][src]Struct rspirv::dr::Instruction

pub struct Instruction {
    pub class: &'static Instruction<'static>,
    pub result_type: Option<Word>,
    pub result_id: Option<Word>,
    pub operands: Vec<Operand>,
}

Data representation of a SPIR-V instruction.

Fields

class: &'static Instruction<'static>

The class (grammar specification) of this instruction.

result_type: Option<Word>

Result type id.

result_id: Option<Word>

Result id.

operands: Vec<Operand>

Operands.

Implementations

impl Instruction[src]

pub fn is_type_identical(&self, other: &Instruction) -> bool[src]

Compare two instructions by opcode and operands; this is the equality identity for OpType instructions

impl Instruction[src]

pub fn new(
    opcode: Op,
    result_type: Option<Word>,
    result_id: Option<Word>,
    operands: Vec<Operand>
) -> Self
[src]

Creates a new Instruction instance.

Trait Implementations

impl Assemble for Instruction[src]

impl Clone for Instruction[src]

impl Debug for Instruction[src]

impl Disassemble for Instruction[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.