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

            
5
/// Clears the current error message in status (this is also accomplished by any command that starts playback)
6
pub struct ClearError;
7

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

            
12
    fn parse_request(mut parts: std::str::SplitWhitespace<'_>) -> RequestParserResult<'_> {
13
        debug_assert!(parts.next().is_none());
14

            
15
        Ok((Request::ClearError, ""))
16
    }
17

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