[−][src]Module diplomacy::parser
Contains error types and trait implementations for parsing diplomacy orders.
All orders are expected to be in the following format:
{Nation}: {UnitType} {Location} {Command}
Supported Commands
- Hold:
hold
orholds
- Move:
-> {Destination}
- Support:
supports {UnitType} {Region} [-> {Dest}]
- Convoy:
convoys {Region} -> {Dest}
- Build:
build
(this is non-idiomatic, but easier to parse) - Disband:
disband
Structs
Error | The error type for order parsing. |
Enums
ErrorKind | Different kinds of parsing error; this is not meant to be exhaustive. |
Traits
FromWords | A parser which operates on whitespace-delimited words from an input string. |