use crate::{ commands::{ Command, RequestParserError, RequestParserResult, ResponseAttributes, ResponseParserError, }, Request, }; pub struct ProtocolEnable; impl Command for ProtocolEnable { type Response = (); const COMMAND: &'static str = "protocol enable"; 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 mut features = Vec::new(); for feature in parts { features.push(feature.to_string()); } Ok((Request::ProtocolEnable(features), "")) } fn parse_response( parts: ResponseAttributes<'_>, ) -> Result { debug_assert!(parts.is_empty()); Ok(()) } }