pogo-masterfile-types
Generated Rust types for the Pokémon GO masterfile, plus a typed parse_masterfile dispatcher that returns each entry as its concrete variant.
Install
Usage
use ;
let json = read_to_string?;
let entries = parse_masterfile?;
for entry in entries
# Ok::
What's in the crate
Each masterfile discriminator gets its own module containing three types:
Entry— the outer{ templateId, data: { ... } }wrapper.EntryData— the innerdataobject, with the discriminator-keyed payload field.- The payload type — the shape of the payload itself. Multi-shape groups are Rust enums dispatching to per-cluster variant structs.
Singletons (entries unique by templateId) live in the singletons module.
Top-level MasterfileEntry is an #[serde(untagged)] enum — feed the raw JSON to parse_masterfile and serde walks the variants until one fits.
Source
Generated from masterfile.json via the codegen pipeline at the repo root. Don't edit emitted files by hand — re-run bun run generate instead.
License
MIT — see LICENSE.