1
use crate::{
2
    commands::{Command, RequestParserResult, ResponseAttributes, ResponseParserError},
3
    Request,
4
};
5

            
6
pub struct ProtocolAll;
7

            
8
impl Command for ProtocolAll {
9
    type Response = ();
10
    const COMMAND: &'static str = "protocol all";
11

            
12
    fn parse_request(mut parts: std::str::SplitWhitespace<'_>) -> RequestParserResult<'_> {
13
        debug_assert!(parts.next().is_none());
14
        Ok((Request::ProtocolAll, ""))
15
    }
16

            
17
    fn parse_response(
18
        parts: ResponseAttributes<'_>,
19
    ) -> Result<Self::Response, ResponseParserError> {
20
        debug_assert!(parts.is_empty());
21
        Ok(())
22
    }
23
}