Implement some more commands
This commit is contained in:
22
src/commands/queue/clear.rs
Normal file
22
src/commands/queue/clear.rs
Normal file
@@ -0,0 +1,22 @@
|
||||
use crate::commands::{
|
||||
Command, Request, RequestParserResult, ResponseAttributes, ResponseParserError,
|
||||
};
|
||||
|
||||
pub struct Clear;
|
||||
|
||||
impl Command for Clear {
|
||||
type Response = ();
|
||||
const COMMAND: &'static str = "clear";
|
||||
|
||||
fn parse_request(mut parts: std::str::SplitWhitespace<'_>) -> RequestParserResult<'_> {
|
||||
debug_assert!(parts.next().is_none());
|
||||
Ok((Request::Clear, ""))
|
||||
}
|
||||
|
||||
fn parse_response(
|
||||
parts: ResponseAttributes<'_>,
|
||||
) -> Result<Self::Response, ResponseParserError> {
|
||||
debug_assert!(parts.is_empty());
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user