pub enum Value {
Show 13 variants
Number {
value: f64,
text: String,
},
String(String),
LocalizedString(String),
Bool(bool),
Null,
Array(Vec<ValueId>),
Vector {
x: ValueId,
y: ValueId,
z: ValueId,
},
Enum {
value_type: String,
value: String,
},
GlobalVariable(GlobalVarId),
PlayerVariable {
player: ValueId,
variable: PlayerVarId,
},
Subroutine(SubroutineId),
EventPlayer,
Call {
name: String,
args: Vec<ValueId>,
},
}Expand description
A workshop value (expression).
Variants§
Number
A numeric literal with its source spelling (5, 0.0, -22.05);
computed values (constant folding) carry the formatted spelling.
String(String)
LocalizedString(String)
A reviewed localized Workshop preset-string identity.
Bool(bool)
Null
Array(Vec<ValueId>)
Vector
Enum
A built-in enumerated value, e.g. Team.ALL.
GlobalVariable(GlobalVarId)
PlayerVariable
Subroutine(SubroutineId)
A declared Workshop subroutine referenced by a generic action such as
Start Rule. The identity is source-owned, not a catalog builtin.
EventPlayer
Call
A function call over workshop values.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnsafeUnpin for Value
impl UnwindSafe for Value
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