Re-exports§
pub use inventory;
Structs§
- Command
Map - A generic string-keyed map for storing command handlers.
- Command
Meta - Metadata describing a registered command.
- Command
Param Meta - Metadata for a single command parameter.
- Command
Registration - A registration entry collected by the
#[command]macro viainventory. - Json
- A wrapper for JSON-deserialized command arguments (axum-style extractor).
- NoArgs
Body - Marker type for handlers that take no arguments.
Enums§
- Command
Context - The context passed to a command handler, carrying the input arguments.
- Command
Response - The response from a command handler.
Traits§
- Command
Handler - Trait for synchronous command handlers.
- Command
Handler Async - Trait for asynchronous command handlers.
- From
Command Args - Trait for extracting typed arguments from a
CommandContext.
Functions§
- clear_
command_ callback - Clear all registered callback commands.
- clear_
commands - Clear all registered sync commands.
- clear_
commands_ async - Clear all registered async commands.
- export_
commands_ json - Export all command metadata to a JSON file at the given path.
- get_
all_ command_ metas - Collect metadata for all commands registered via
#[command]macros. - get_
command_ async_ keys - Get all registered async command keys.
- get_
command_ async_ len - Get the number of registered async commands.
- get_
command_ callback_ keys - Get all registered callback command keys.
- get_
command_ callback_ len - Get the number of registered callback commands.
- get_
command_ keys - Get all registered sync command keys.
- get_
command_ len - Get the number of registered sync commands.
- invoke_
command - Invoke a sync command by key.
- invoke_
command_ async - Invoke an async command by key.
- invoke_
command_ callback - Invoke a callback command by key.
- invoke_
command_ callback_ lazy - Invoke a callback command with automatic serialization/deserialization.
- reg_
all_ commands - Execute all auto-registered command handlers collected by
#[command]macros. - reg_
command - Register a sync command handler.
- reg_
command_ async - Register an async command handler.
- reg_
command_ callback - Register a callback command handler.
- unreg_
command - Unregister a sync command.
- unreg_
command_ async - Unregister an async command.
- unreg_
command_ callback - Unregister a callback command.
Type Aliases§
- Command
Handler Value Callback - Command
Handler Value Callback Result - Command
Result - The result type returned by all command handlers.
Attribute Macros§
- command
- Mark a function as a command handler and auto-register it.