Implement a proper request tokenizer

This commit is contained in:
2025-11-24 14:18:30 +09:00
parent 181b437b80
commit abc1fcc01b
136 changed files with 883 additions and 365 deletions
@@ -1,6 +1,9 @@
use crate::commands::{
Command, Request, RequestParserError, RequestParserResult, ResponseAttributes,
ResponseParserError,
use crate::{
request_tokenizer::RequestTokenizer,
commands::{
Command, Request, RequestParserError, RequestParserResult, ResponseAttributes,
ResponseParserError,
},
};
pub struct BinaryLimit;
@@ -14,7 +17,7 @@ impl Command for BinaryLimit {
format!("{} {}", Self::COMMAND, request)
}
fn parse_request(mut parts: std::str::SplitWhitespace<'_>) -> RequestParserResult<'_> {
fn parse_request(mut parts: RequestTokenizer<'_>) -> RequestParserResult<'_> {
let limit = parts.next().ok_or(RequestParserError::UnexpectedEOF)?;
let limit = limit
.parse()