async_mpd/client/
error.rs

1use std::io;
2use std::num::ParseIntError;
3
4/// Error
5#[derive(thiserror::Error, Debug)]
6pub enum Error {
7    /// Server failed to parse the command
8    #[error("Invalid command or arguments")]
9    CommandError { msg: String },
10
11    /// The server closed the connection
12    #[error("The server closed the connection")]
13    Disconnected,
14
15    /// Represents all other cases of `std::io::Error`.
16    #[error(transparent)]
17    IOError(#[from] io::Error),
18
19    /// TODO
20    #[error("Server error")]
21    ServerError { msg: String },
22
23    /// Generic unexpected response error
24    #[error("invalid value error")]
25    ValueError { msg: String },
26
27    /// Conversion error
28    #[error(transparent)]
29    ParseInteError(#[from] ParseIntError),
30}