pub struct GlobalVar {
pub is_static: bool,
pub is_const: bool,
pub ty: TypeRef,
pub name: String,
pub array_len: Option<Expr>,
pub init: Option<Expr>,
pub span: Span,
}Fields§
§is_static: booltrue if the source said static.
is_const: booltrue if the source said const.
ty: TypeRef§name: String§array_len: Option<Expr>Set when the declaration carried an [N] array suffix.
init: Option<Expr>Set when an initializer was provided. static const decls keep
the init mandatory by HLSL rules, but we don’t enforce that
here — the parser accepts whatever the source says, and a
future validation pass can flag missing inits if needed.
span: SpanTrait Implementations§
impl StructuralPartialEq for GlobalVar
Auto Trait Implementations§
impl Freeze for GlobalVar
impl RefUnwindSafe for GlobalVar
impl Send for GlobalVar
impl Sync for GlobalVar
impl Unpin for GlobalVar
impl UnwindSafe for GlobalVar
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