Expand description
§kal
Command Abstraction Layer for bot libraries
Modules§
- lex
- The lex module provides a lexer for parsing commands.
It coudl be enabled with
"lex"
feature flag.
Macros§
- command_
group - Make an enum implementing
Command
where its every variant have only one field implementsCommnad
. The enum will provide a parse function matching each variant’s name directly.
Structs§
- Comma
Separated - Wrapper for
Vec
that separates elements by space - Command
Option - The option command cane take
- Command
Spec - The specification of coomand
- Space
Separated - Wrapper for
Vec
that separates elements by comma - TryFrom
Argument Value Error - Failed to convert
CommandArgumentValue
to the type expected.
Enums§
- Command
Argument - Command argument
- Command
Argument Value - The actual argument value
- Command
Argument Value Type - The type that command argument could be
- Command
Fragment - The fragment of user command
- Command
Option Value Kind - The kind of value option can take
- Command
Parse Error - An error made while parsing command from
CommandFragment
.
Traits§
- Command
- The command
- Command
Option Value Ty - Associate Rust type with
CommandOptionValueKind
and provide Rust side default value. - TryFrom
Argument Value - The trait to convert
CommandArgumentValue
to the type expected.
Derive Macros§
- Command
- Derive Command trait from kal for a struct or an enum.