Struct naga::GlobalVariable
source · pub struct GlobalVariable {
pub name: Option<String>,
pub space: AddressSpace,
pub binding: Option<ResourceBinding>,
pub ty: Handle<Type>,
pub init: Option<Handle<Expression>>,
}
Expand description
Variable defined at module level.
Fields§
§name: Option<String>
Name of the variable, if any.
space: AddressSpace
How this variable is to be stored.
binding: Option<ResourceBinding>
For resources, defines the binding point.
ty: Handle<Type>
The type of this variable.
init: Option<Handle<Expression>>
Initial value for this variable.
This refers to an Expression
in Module::global_expressions
.
Trait Implementations§
source§impl Clone for GlobalVariable
impl Clone for GlobalVariable
source§fn clone(&self) -> GlobalVariable
fn clone(&self) -> GlobalVariable
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for GlobalVariable
impl Debug for GlobalVariable
source§impl PartialEq for GlobalVariable
impl PartialEq for GlobalVariable
impl StructuralPartialEq for GlobalVariable
Auto Trait Implementations§
impl Freeze for GlobalVariable
impl RefUnwindSafe for GlobalVariable
impl Send for GlobalVariable
impl Sync for GlobalVariable
impl Unpin for GlobalVariable
impl UnwindSafe for GlobalVariable
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)