pub trait QCodeView<'ctx, 'str>: Copywhere
'str: 'ctx,{
Show 23 methods
// Required methods
fn shared(self) -> &'ctx Shared<'str>;
fn interface(self, id: FunctionId) -> &'ctx FunctionInterface<'str>;
fn function(self, id: FunctionId) -> &'ctx FunctionBody<'str>;
// Provided methods
fn owner(self) -> Option<FunctionId> { ... }
fn instruction(self, id: InstructionId) -> &'ctx Instruction<'str> { ... }
fn contains_instruction(self, id: InstructionId) -> bool { ... }
fn block(self, id: BlockId) -> &'ctx BasicBlock<'str> { ... }
fn contains_block(self, id: BlockId) -> bool { ... }
fn block_param(self, id: BlockParamId) -> &'ctx BlockParam<'str> { ... }
fn contains_block_param(self, id: BlockParamId) -> bool { ... }
fn edge(self, function: FunctionId, id: EdgeId) -> &'ctx EdgeData { ... }
fn temp_space(self, id: TempSpaceId) -> &'ctx TempSpace { ... }
fn contains_temp_space(self, id: TempSpaceId) -> bool { ... }
fn temp(self, id: TempId) -> &'ctx Temp<'str> { ... }
fn contains_temp(self, id: TempId) -> bool { ... }
fn type_of(self, id: ValueId) -> TypeId { ... }
fn stored_type_of(self, id: ValueId) -> Option<TypeId> { ... }
fn block_ref(self, id: BlockId) -> BlockRef<'str, 'ctx, Self>
where Self: Sized { ... }
fn insn_ref(self, id: InstructionId) -> InstructionRef<'str, 'ctx, Self>
where Self: Sized { ... }
fn param_ref(self, id: BlockParamId) -> BlockParamRef<'str, 'ctx, Self>
where Self: Sized { ... }
fn function_ref(self, id: FunctionId) -> FunctionRef<'str, 'ctx, Self>
where Self: Sized { ... }
fn temp_space_ref(self, id: TempSpaceId) -> TempSpaceRef<'str, 'ctx, Self>
where Self: Sized { ... }
fn temp_ref(self, id: TempId) -> TempRef<'str, 'ctx, Self>
where Self: Sized { ... }
}Expand description
Read-only resolution capability shared by module and single-body views.
The explicit lifetimes let provider-generic refs return data with the provider’s underlying borrow lifetime, rather than tying results to a short borrow of the thin provider value.
Required Methods§
fn interface(self, id: FunctionId) -> &'ctx FunctionInterface<'str>
fn function(self, id: FunctionId) -> &'ctx FunctionBody<'str>
Provided Methods§
Sourcefn owner(self) -> Option<FunctionId>
fn owner(self) -> Option<FunctionId>
The single function this view is scoped to, if any. A whole-module view
returns None (it may read every function); a function-pass BodyView
returns its owner, so callers can avoid a cross-function read that the
locality guard would panic on (e.g. rendering a foreign SymbolicRef::Block
falls back to the numeric form instead of resolving its name).
fn instruction(self, id: InstructionId) -> &'ctx Instruction<'str>
fn contains_instruction(self, id: InstructionId) -> bool
fn block(self, id: BlockId) -> &'ctx BasicBlock<'str>
fn contains_block(self, id: BlockId) -> bool
fn block_param(self, id: BlockParamId) -> &'ctx BlockParam<'str>
fn contains_block_param(self, id: BlockParamId) -> bool
fn edge(self, function: FunctionId, id: EdgeId) -> &'ctx EdgeData
fn temp_space(self, id: TempSpaceId) -> &'ctx TempSpace
fn contains_temp_space(self, id: TempSpaceId) -> bool
fn temp(self, id: TempId) -> &'ctx Temp<'str>
fn contains_temp(self, id: TempId) -> bool
fn type_of(self, id: ValueId) -> TypeId
fn stored_type_of(self, id: ValueId) -> Option<TypeId>
fn block_ref(self, id: BlockId) -> BlockRef<'str, 'ctx, Self>where
Self: Sized,
fn insn_ref(self, id: InstructionId) -> InstructionRef<'str, 'ctx, Self>where
Self: Sized,
fn param_ref(self, id: BlockParamId) -> BlockParamRef<'str, 'ctx, Self>where
Self: Sized,
fn function_ref(self, id: FunctionId) -> FunctionRef<'str, 'ctx, Self>where
Self: Sized,
fn temp_space_ref(self, id: TempSpaceId) -> TempSpaceRef<'str, 'ctx, Self>where
Self: Sized,
fn temp_ref(self, id: TempId) -> TempRef<'str, 'ctx, Self>where
Self: Sized,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".