Lines
0 %
Functions
use serde::{Deserialize, Serialize};
// See https://github.com/MusicPlayerDaemon/MPD/blob/7774c3369e1484dc5dec6d7d9572e0a57e9c5302/src/command/AllCommands.cxx#L67-L209
pub type Response = Result<(), MpdError>;
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
pub enum ErrorCode {
NotList = 1,
Arg = 2,
Password = 3,
Permission = 4,
Unknown = 5,
NoExist = 50,
PlaylistMax = 51,
System = 52,
PlaylistLoad = 53,
UpdateAlready = 54,
PlayerSync = 55,
Exist = 56,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct MpdError {
code: ErrorCode,
command: String,
message: String,
command_list_num: usize,