Expand description
A submodule that provides the parser output objects. The parser uses GameObject to store the parsed data and structures in structures are initialized from these objects. This is our workaround for the lack of reflection in Rust, and it puts one more layer of abstraction between the parser and the structures. Jomini style would be to have the structures directly initialized from the token tape, but that wouldn’t play well with the way we store everything in a central GameState object.
Enums§
- Conversion
Error - An error that can occur when converting a value from a save file.
- KeyError
- Save
File Object - An object that comes from a save file.
- Save
File Value - A value that comes from a save file. Matching against this enum is a bad idea, because SaveFileValue::String may actually contain any type. It’s better to use the conversion methods like SaveFileValue::as_string.
- Save
Object Error
Constants§
- BOOL_
FALSE 🔒 - A string that represents a boolean false value.
- BOOL_
TRUE 🔒 - A string that represents a boolean true value.
Traits§
Type Aliases§
- Game
Object Array - A game object that stores values as an array.
- Game
Object Map - A game object that stores values as a map.