pub enum Value {
Boolean(bool),
Float(f64),
Integer(i128),
String(String),
}
Expand description
An algebraic data type that can be used to represent many types of values that can be present in
a Stack.
Scriptful supports customization of value types through generics, yet this enum is
provided in expectation that some users will prefer not to define their own type systems but
rather use a stock solution.
Value has four variants that should cover most use cases, namely: Boolean,
Float, Integer or String.
The point of Value is being used inside Scripts (wrapped in an Item) or
to be pushed into a Stack.
Value does not implement any methods other than implementations of some traits from the
core crate.