Expand description
Create a chatbot command interface using a docopt-like API
Re-exports§
pub use anyhow::Error as Anyhow;
Modules§
- prelude
- Common traits and types used with this crate
Structs§
- Argument
Desc - Detailed description of a command argument
- Argument
Name - Identifies an argument to a command
- Argument
Usage - Usage description for an argument
- Command
Desc - Detailed description of a command
- Command
Usage - Usage description for a command
- Simple
Fold Error - A basic implementation of
FoldError
that outputs a string describing the error. - Simple
Fold Help - A basic implementation of
FoldHelp
outputting multiline strings akin to POSIX command help text.
Enums§
- Command
Parse Error - Error type for failures when parsing a command
- Downcast
- Helper for downcasting
anyhow::Error
into possibledocbot
errors - Help
Topic - A generic help topic
- IdParse
Error - Error type for failures when parsing a command ID
- Path
Parse Error - Error type for failures when parsing a command path
Traits§
- Command
- A parsable, identifiable command or family of commands
- Command
Id - A command ID, convertible to and from a string
- Command
Path - A chain of command IDs representing a command or subcommand
- Fold
Error - Helper trait for processing and formatting errors from
docbot
- Fold
Help - Helper trait for processing and formatting help topics from
docbot
- Help
- A command with associated help topics
Functions§
- did_
you_ mean - Rank a list of options by their similarity to the given input. Contains
some basic heuristics tailored towards the
Docbot
parser. - tokenize_
str_ simple - Performs simple tokenization of a string with minimal support for single- and double-quoting
Derive Macros§
- Docbot
- Construct a new command or set of commands from doc comments