pub enum RonValue {
String(String),
Integer(i64),
Float(f64),
Bool(bool),
Option(Option<Box<Spanned<RonValue>>>),
Identifier(String),
EnumVariant(String, Box<Spanned<RonValue>>),
List(Vec<Spanned<RonValue>>),
Map(Vec<(Spanned<RonValue>, Spanned<RonValue>)>),
Tuple(Vec<Spanned<RonValue>>),
Struct(RonStruct),
}Expand description
A parsed RON data value, preserving bare identifiers for enum validation.
Variants§
String(String)
A quoted string (e.g., "Ashborn Hound").
Integer(i64)
A whole number (e.g., 42, -1).
Float(f64)
A floating-point number (e.g., 3.14, 1.0).
Bool(bool)
A boolean (true or false).
Option(Option<Box<Spanned<RonValue>>>)
Some(value) or None. The inner value carries its own span for precise error reporting.
Identifier(String)
A bare identifier (e.g., Creature, Sentinels). Preserved for enum variant validation.
EnumVariant(String, Box<Spanned<RonValue>>)
An enum variant with associated data (e.g., Damage(5)).
List(Vec<Spanned<RonValue>>)
A list of values (e.g., [Creature, Trap]). Each element carries its own span.
Map(Vec<(Spanned<RonValue>, Spanned<RonValue>)>)
A map of key-value pairs (e.g., { "str": 5, "dex": 3 }). Each key and value carries its own span.
Tuple(Vec<Spanned<RonValue>>)
A positional tuple (e.g., (1.0, 2.5)). Each element carries its own span.
Struct(RonStruct)
A struct with named fields (e.g., (name: "foo", age: 5)).
Trait Implementations§
impl StructuralPartialEq for RonValue
Auto Trait Implementations§
impl Freeze for RonValue
impl RefUnwindSafe for RonValue
impl Send for RonValue
impl Sync for RonValue
impl Unpin for RonValue
impl UnsafeUnpin for RonValue
impl UnwindSafe for RonValue
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