pub struct Variable {
pub scope: Option<String>,
pub name: String,
pub ty: Type,
pub locations: Vec<Location>,
}Expand description
A variable: a parameter, a local, the function’s return value or a constant.
Fields§
§scope: Option<String>The name of the function or constant buffer it is in (offset at 0 of the record); None (offset 0) for a
local of the entry point and the return value of a function, named by the function’s name.
name: StringThe variable’s name (offset at 4).
ty: TypeThe variable’s type (offset at 8), in the layout of the constant table’s types.
locations: Vec<Location>The instructions that write it (the count at 12 and the table’s offset at 16).
Trait Implementations§
impl Eq for Variable
impl StructuralPartialEq for Variable
Auto Trait Implementations§
impl Forget for Variable
impl Freeze for Variable
impl RefUnwindSafe for Variable
impl Send for Variable
impl Sync for Variable
impl Unpin for Variable
impl UnsafeUnpin for Variable
impl UnwindSafe for Variable
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