pub struct WorkshopVariable {
pub name: String,
pub index: u32,
pub span: Option<Span>,
pub name_span: Option<Span>,
}Expand description
A workshop variable (global or player) with its assigned index.
Declaration initializers are lowered into synthetic “Initialize global variables” / “Initialize player variables” rules during HIR → WIR lowering (#112); the variable tables carry no initializer field, so the Initialize rules are the single source of truth.
Fields§
§name: String§index: u32The workshop variable index assigned during lowering.
span: Option<Span>§name_span: Option<Span>The exact span of the declared identifier token.
Trait Implementations§
Source§impl Clone for WorkshopVariable
impl Clone for WorkshopVariable
Source§fn clone(&self) -> WorkshopVariable
fn clone(&self) -> WorkshopVariable
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 WorkshopVariable
impl RefUnwindSafe for WorkshopVariable
impl Send for WorkshopVariable
impl Sync for WorkshopVariable
impl Unpin for WorkshopVariable
impl UnsafeUnpin for WorkshopVariable
impl UnwindSafe for WorkshopVariable
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