pub struct Function {
pub def: Option<Instruction>,
pub end: Option<Instruction>,
pub parameters: Vec<Instruction>,
pub blocks: Vec<Block>,
}
Expand description
Data representation of a SPIR-V function.
Fields§
§def: Option<Instruction>
First (defining) instruction in this function.
end: Option<Instruction>
Last (ending) instruction in this function.
parameters: Vec<Instruction>
Function parameters.
blocks: Vec<Block>
Blocks in this function.
Implementations§
source§impl Function
impl Function
pub fn def_id(&self) -> Option<Word>
pub fn all_inst_iter(&self) -> impl Iterator<Item = &Instruction>
pub fn all_inst_iter_mut(&mut self) -> impl Iterator<Item = &mut Instruction>
Trait Implementations§
source§impl Assemble for Function
impl Assemble for Function
source§fn assemble_into(&self, result: &mut Vec<u32>)
fn assemble_into(&self, result: &mut Vec<u32>)
Assembles the current object into the
result
vector, reducing the need for lots of allocationssource§impl Disassemble for Function
impl Disassemble for Function
source§fn disassemble(&self) -> String
fn disassemble(&self) -> String
Disassembles the current object and returns the assembly code.
Auto Trait Implementations§
impl RefUnwindSafe for Function
impl Send for Function
impl Sync for Function
impl Unpin for Function
impl UnwindSafe for Function
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more