use crate::{ Request, commands::{ Command, RequestParserError, RequestParserResult, ResponseAttributes, ResponseParserError, }, }; pub struct ProtocolDisable; impl Command for ProtocolDisable { type Response = (); const COMMAND: &'static str = "protocol disable"; fn parse_request(parts: std::str::SplitWhitespace<'_>) -> RequestParserResult<'_> { let mut parts = parts.peekable(); if parts.peek().is_none() { return Err(RequestParserError::UnexpectedEOF); } // TODO: verify that the features are split by whitespace let features = parts.map(|s| s.to_string()).collect::>(); Ok((Request::ProtocolDisable(features), "")) } fn parse_response( parts: ResponseAttributes<'_>, ) -> Result> { debug_assert!(parts.is_empty()); Ok(()) } }