Struct spirq::parse::Instr

source ·
pub struct Instr { /* private fields */ }

Implementations§

source§

impl Instr

source

pub fn new(x: &[u32]) -> Result<&Instr, Error>

source

pub fn opcode(&self) -> u32

Get the instruction opcode.

source

pub fn op(&self) -> Op

Get the instruction op.

source

pub fn word_count(&self) -> usize

Get the word count of the instruction, including the first word containing the word count and opcode.

source

pub fn operands(&self) -> Operands<'_>

Get an instruction operand reader. The reader does NO boundary checking so the user code MUST make sure the implementation follows the specification.

Trait Implementations§

source§

impl AsRef<[u32]> for Instr

source§

fn as_ref(&self) -> &[u32]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Borrow<Instr> for Instruction

source§

fn borrow(&self) -> &Instr

Immutably borrows from an owned value. Read more
source§

impl Debug for Instr

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl ToOwned for Instr

§

type Owned = Instruction

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> <Instr as ToOwned>::Owned

Creates owned data from borrowed data, usually by cloning. Read more
1.63.0 · source§

fn clone_into(&self, target: &mut Self::Owned)

Uses borrowed data to replace owned data, usually by cloning. Read more

Auto Trait Implementations§

§

impl Freeze for Instr

§

impl RefUnwindSafe for Instr

§

impl Send for Instr

§

impl !Sized for Instr

§

impl Sync for Instr

§

impl Unpin for Instr

§

impl UnwindSafe for Instr

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more