MCPcopy Create free account
hub / github.com/Rust-GPU/rust-gpu / index_get

Method index_get

crates/rustc_codegen_spirv/src/linker/specializer.rs:389–394  ·  view source on GitHub ↗
(&self, idx: OperandIdx)

Source from the content-addressed store, hash-verified

387
388impl 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()),

Callers

nothing calls this directly

Calls 1

as_refMethod · 0.45

Tested by

no test coverage detected