Implement some more commands
This commit is contained in:
38
src/commands/queue/plchangesposid.rs
Normal file
38
src/commands/queue/plchangesposid.rs
Normal file
@@ -0,0 +1,38 @@
|
||||
use crate::{
|
||||
commands::{
|
||||
Command, RequestParserError, RequestParserResult, ResponseAttributes, ResponseParserError,
|
||||
},
|
||||
Request,
|
||||
};
|
||||
|
||||
pub struct PlChangesPosId;
|
||||
|
||||
impl Command for PlChangesPosId {
|
||||
type Response = ();
|
||||
const COMMAND: &'static str = "plchangesposid";
|
||||
|
||||
fn parse_request(mut parts: std::str::SplitWhitespace<'_>) -> RequestParserResult<'_> {
|
||||
let version = parts.next().ok_or(RequestParserError::UnexpectedEOF)?;
|
||||
let version = version
|
||||
.parse()
|
||||
.map_err(|_| RequestParserError::SyntaxError(0, version.to_string()))?;
|
||||
|
||||
let window = parts
|
||||
.next()
|
||||
.map(|w| {
|
||||
w.parse()
|
||||
.map_err(|_| RequestParserError::SyntaxError(0, w.to_string()))
|
||||
})
|
||||
.transpose()?;
|
||||
|
||||
debug_assert!(parts.next().is_none());
|
||||
|
||||
Ok((Request::PlChangesPosId(version, window), ""))
|
||||
}
|
||||
|
||||
fn parse_response(
|
||||
parts: ResponseAttributes<'_>,
|
||||
) -> Result<Self::Response, ResponseParserError> {
|
||||
unimplemented!()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user