diff --git a/src/commands.rs b/src/commands.rs index 2270624..8b967d9 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -60,7 +60,11 @@ where /// The minimum number of arguments this command takes const MIN_ARGS: u32; - /// The maximum number of arguments this command takes + /// The maximum number of arguments this command takes. + /// + /// Note that in the case of keyworded arguments, such as + /// `group `, `sort `, etc., these are + /// counted as a single argument despite being two tokens. const MAX_ARGS: Option; /// Helper function to create a [`RequestParserError::TooManyArguments`] error @@ -555,6 +559,10 @@ pub enum RequestParserError { )] SubtypeParserError { /// The index of the argument that failed to parse + /// + /// Note that in the case of keyworded arguments, such as + /// `group `, `sort `, etc., these are + /// counted as a single argument despite being two tokens. argument_index: u32, /// The expected type of the argument @@ -577,6 +585,10 @@ pub enum RequestParserError { expected_max: Option, /// The number of arguments that were found + /// + /// Note that in the case of keyworded arguments, such as + /// `group `, `sort `, etc., these are + /// counted as a single argument despite being two tokens. found: u32, }, @@ -593,6 +605,10 @@ pub enum RequestParserError { expected_max: Option, /// The number of arguments that were found + /// + /// Note that in the case of keyworded arguments, such as + /// `group `, `sort `, etc., these are + /// counted as a single argument despite being two tokens. found: u32, },