Module command

Module command 

Source
Expand description

Command helpers and traits used by the #[derive(Command)] macro.

Plugin authors usually interact with:

  • Ctx, the per-command execution context (for replying to the sender).
  • CommandRegistry, which is implemented for you by #[derive(Plugin)].
  • CommandParseError, surfaced as friendly messages to players.

Structs§

Ctx
Per-command execution context.

Enums§

CommandParseError

Traits§

CommandRegistry
Trait plugins use to expose commands to the host.

Functions§

parse_optional_arg
Parse an optional argument at the given index. Returns Ok(None) if the argument is missing. Returns Ok(Some(value)) if present and parseable. Returns Err if present but invalid.
parse_required_arg
Parse a required argument at the given index.