Skip to main content

Saves

Derive Macro Saves 

Source
#[derive(Saves)]
Expand description

Derives the engine’s view of a vocabulary of keys a game keeps between runs: its values, and the name the store keeps each of them under — the vocabulary’s own name, ., and the value’s name.

The value a key keeps, and its fallback before any run has saved one, are declared by hand in SaveKey; a variant with fields fails to compile, because a key is a plain name.