Expand description

Create a chatbot command interface using a docopt-like API

Re-exports

pub use anyhow::Error as Anyhow;

Modules

Common traits and types used with this crate

Structs

Detailed description of a command argument

Identifies an argument to a command

Usage description for an argument

Detailed description of a command

Usage description for a command

A basic implementation of FoldError that outputs a string describing the error.

A basic implementation of FoldHelp outputting multiline strings akin to POSIX command help text.

Enums

Error type for failures when parsing a command

Helper for downcasting anyhow::Error into possible docbot errors

A generic help topic

Error type for failures when parsing a command ID

Error type for failures when parsing a command path

Traits

A parsable, identifiable command or family of commands

A command ID, convertible to and from a string

A chain of command IDs representing a command or subcommand

Helper trait for processing and formatting errors from docbot

Helper trait for processing and formatting help topics from docbot

A command with associated help topics

Functions

Rank a list of options by their similarity to the given input. Contains some basic heuristics tailored towards the Docbot parser.

Performs simple tokenization of a string with minimal support for single- and double-quoting

Derive Macros

Construct a new command or set of commands from doc comments