(&self, idx: OperandIdx)
| 387 | |
| 388 | impl OperandIndexGetSet<OperandIdx> for Instruction { |
| 389 | fn index_get(&self, idx: OperandIdx) -> Operand { |
| 390 | match idx { |
| 391 | OperandIdx::ResultType => Operand::IdRef(self.result_type.unwrap()), |
| 392 | OperandIdx::Input(i) => self.operands[i].clone(), |
| 393 | } |
| 394 | } |
| 395 | fn index_set(&mut self, idx: OperandIdx, operand: Operand) { |
| 396 | match idx { |
| 397 | OperandIdx::ResultType => self.result_type = Some(operand.unwrap_id_ref()), |