Struct sway_ir::instruction::InstructionInserter
source · pub struct InstructionInserter<'a> { /* private fields */ }
Expand description
Provide a context for appending new Instruction
s to a Block
.
Implementations§
source§impl<'a> InstructionInserter<'a>
impl<'a> InstructionInserter<'a>
sourcepub fn new(context: &'a mut Context, block: Block) -> InstructionInserter<'a>
pub fn new(context: &'a mut Context, block: Block) -> InstructionInserter<'a>
Return a new InstructionInserter
context for block
.
sourcepub fn asm_block(
self,
args: Vec<AsmArg>,
body: Vec<AsmInstruction>,
return_type: Type,
return_name: Option<Ident>
) -> Value
pub fn asm_block(
self,
args: Vec<AsmArg>,
body: Vec<AsmInstruction>,
return_type: Type,
return_name: Option<Ident>
) -> Value
Append a new Instruction::AsmBlock
from args
and a body
.