Crate efo

Crate efo 

Source
Expand description

ยงepoch_forge CLI

The command-line interface for epoch_forge. It exposes a single binary efo that supports the following sub-commands:

ยงSub-modules

  • epoch - switch / advance time
  • event - add / remove events
  • chr - add / remove characters
  • town - add / remove towns
  • blocker - add / remove blockers
  • calamity - add / remove calamities
  • link - add / remove links (alliances, wars, roads, etc.)

Each sub-command is implemented in its own module under commands/. The main.rs file simply parses arguments with clap and dispatches to the appropriate handler. The handlers share a common World instance that they load from / persist to disk.

Each module exposes a handle function that receives the parsed arguments

Modulesยง

commands ๐Ÿ”’
commands module
error ๐Ÿ”’
General error type that the CLI propagates.
success ๐Ÿ”’
List of all success messages possible

Structsยง

Cli ๐Ÿ”’
The root command-line parser for the efo binary.

Enumsยง

TopLevelCmd ๐Ÿ”’
Enumeration of the top-level sub-commands that efo accepts.

Functionsยง

exec_dispatch ๐Ÿ”’
Dispatches the parsed command to the appropriate handler.
main ๐Ÿ”’
Program entry point.