struct Block {
    label_id: Word,
    body: Vec<Instruction>,
}Expand description
A SPIR-V block to which we are still adding instructions.
A Block represents a SPIR-V block that does not yet have a termination
instruction like OpBranch or OpReturn.
The OpLabel that starts the block is implicit. It will be emitted based on
label_id when we write the block to a LogicalLayout.
To terminate a Block, pass the block and the termination instruction to
Function::consume. This takes ownership of the Block and transforms it
into a TerminatedBlock.
Fields§
§label_id: Word§body: Vec<Instruction>Implementations§
Auto Trait Implementations§
impl Freeze for Block
impl RefUnwindSafe for Block
impl Send for Block
impl Sync for Block
impl Unpin for Block
impl UnwindSafe for Block
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