Expand description
§RPGN
Rust Portable Game Notation.
A crate for parsing a PGN, built on shakmaty and pgn-reader.
pgn-reader only allows you to read individual, untyped parts of the PGN, but doesn’t actually parse it into something useful.
This crate parses a PGN into the Pgn struct. See the docs for more.
§Features
timeenables converting a RPGN date to atime::DateusingTryFrom.serdeenablesSerializeandDeserializefor most types. Types that implement bothDisplayandFromStr(orInto<char>andTryFrom<char>in the case ofEcoCategory) use those implementations forSerialize/Deserialize. Other types use the automatic, derived version.
Re-exports§
Modules§
Macros§
Structs§
- Move
Number - A struct with methods relevant to the number used in the PGN notation, backed by a
usize. - Pgn
- The generic
Mshould be a struct that implementsMovetext. - RawHeader
Owned - Like
pgn_reader::RawHeader, but has ownership of the bytes. - SanWith
Variations - See
Variation. - Sans
- A vec of SANs. Use if you don’t care about variations.
- Variation
- A vec of SANs with variations. Use if you do care about variations.
Enums§
- EcoCategory
- Outcome
- This is like
shakmaty::Outcome, but with an additional variant:Outcome::Other.
Traits§
- Movetext
- The trait for making a movetext in the
Pgnusing the structure of thepgn_reader::Visitor.