[][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

  1. Hold: hold or holds
  2. Move: -> {Destination}
  3. Support: supports {UnitType} {Region} [-> {Dest}]
  4. Convoy: convoys {Region} -> {Dest}
  5. Build: build (this is non-idiomatic, but easier to parse)
  6. 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.