pub struct GlobalVariable {
pub name: Option<String>,
pub space: AddressSpace,
pub binding: Option<ResourceBinding>,
pub ty: Handle<Type>,
pub init: Option<Handle<Expression>>,
pub layout: Option<MemoryLayout>,
}Expand description
A module-scope variable.
Fields§
§name: Option<String>Optional variable name.
space: AddressSpaceAddress space (uniform, storage, etc.).
binding: Option<ResourceBinding>Optional resource binding (@group(N) @binding(N)).
ty: Handle<Type>The type of this variable.
init: Option<Handle<Expression>>Optional initializer expression.
layout: Option<MemoryLayout>Optional memory layout annotation for tensor data.
Trait Implementations§
Source§impl Clone for GlobalVariable
impl Clone for GlobalVariable
Source§fn clone(&self) -> GlobalVariable
fn clone(&self) -> GlobalVariable
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GlobalVariable
impl RefUnwindSafe for GlobalVariable
impl Send for GlobalVariable
impl Sync for GlobalVariable
impl Unpin for GlobalVariable
impl UnsafeUnpin 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