Module game_object

Source
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§

ConversionError
An error that can occur when converting a value from a save file.
KeyError
SaveFileObject
An object that comes from a save file.
SaveFileValue
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.
SaveObjectError

Constants§

BOOL_FALSE 🔒
A string that represents a boolean false value.
BOOL_TRUE 🔒
A string that represents a boolean true value.

Traits§

GameObjectCollection
GameObjectMapping

Type Aliases§

GameObjectArray
A game object that stores values as an array.
GameObjectMap
A game object that stores values as a map.