24 lines
622 B
Rust
24 lines
622 B
Rust
use crate::{
|
|
Request,
|
|
commands::{Command, RequestParserResult, ResponseAttributes, ResponseParserError},
|
|
};
|
|
|
|
pub struct ProtocolClear;
|
|
|
|
impl Command for ProtocolClear {
|
|
type Response = ();
|
|
const COMMAND: &'static str = "protocol clear";
|
|
|
|
fn parse_request(mut parts: std::str::SplitWhitespace<'_>) -> RequestParserResult<'_> {
|
|
debug_assert!(parts.next().is_none());
|
|
Ok((Request::ProtocolClear, ""))
|
|
}
|
|
|
|
fn parse_response(
|
|
parts: ResponseAttributes<'_>,
|
|
) -> Result<Self::Response, ResponseParserError> {
|
|
debug_assert!(parts.is_empty());
|
|
Ok(())
|
|
}
|
|
}
|