use crate::{ Request, commands::{ Command, RequestParserError, RequestParserResult, ResponseAttributes, ResponseParserError, }, }; pub struct PlChanges; impl Command for PlChanges { type Response = (); const COMMAND: &'static str = "plchanges"; fn parse_request(mut parts: std::str::SplitWhitespace<'_>) -> RequestParserResult<'_> { let version = parts.next().ok_or(RequestParserError::UnexpectedEOF)?; let version = version .parse() .map_err(|_| RequestParserError::SyntaxError(0, version.to_string()))?; let window = parts .next() .map(|w| { w.parse() .map_err(|_| RequestParserError::SyntaxError(0, w.to_string())) }) .transpose()?; debug_assert!(parts.next().is_none()); Ok((Request::PlChanges(version, window), "")) } fn parse_response( parts: ResponseAttributes<'_>, ) -> Result { unimplemented!() } }