Enum mpd::error::ParseError
source · pub enum ParseError {
Show 18 variants
BadInteger(ParseIntError),
BadFloat(ParseFloatError),
BadValue(String),
BadVersion,
NotAck,
BadPair,
BadCode,
BadPos,
NoCodePos,
NoMessage,
NoRate,
NoBits,
NoChans,
BadRate(ParseIntError),
BadBits(ParseIntError),
BadChans(ParseIntError),
BadState(String),
BadErrorCode(usize),
}
Expand description
Parsing error kinds
Variants§
BadInteger(ParseIntError)
invalid integer
BadFloat(ParseFloatError)
invalid float
BadValue(String)
some other invalid value
BadVersion
invalid version format (should be x.y.z)
NotAck
the response is not an ACK
(not an error)
(this is not actually an error, just a marker
to try to parse the response as some other type,
like a pair)
BadPair
invalid pair
BadCode
invalid error code in ACK
response
BadPos
invalid command position in ACK
response
NoCodePos
missing command position and/or error code in ACK
response
NoMessage
missing error message in ACK
response
NoRate
missing bitrate in audio format field
NoBits
missing bits in audio format field
NoChans
missing channels in audio format field
BadRate(ParseIntError)
invalid bitrate in audio format field
BadBits(ParseIntError)
invalid bits in audio format field
BadChans(ParseIntError)
invalid channels in audio format field
BadState(String)
unknown state in state status field
BadErrorCode(usize)
unknown error code in ACK
response
Trait Implementations§
source§impl Clone for ParseError
impl Clone for ParseError
source§fn clone(&self) -> ParseError
fn clone(&self) -> ParseError
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ParseError
impl Debug for ParseError
source§impl Display for ParseError
impl Display for ParseError
source§impl Error for ParseError
impl Error for ParseError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<Infallible> for ParseError
impl From<Infallible> for ParseError
source§fn from(e: StringParseError) -> ParseError
fn from(e: StringParseError) -> ParseError
Converts to this type from the input type.
source§impl From<ParseError> for Error
impl From<ParseError> for Error
source§fn from(e: ParseError) -> Error
fn from(e: ParseError) -> Error
Converts to this type from the input type.
source§impl From<ParseFloatError> for ParseError
impl From<ParseFloatError> for ParseError
source§fn from(e: ParseFloatError) -> ParseError
fn from(e: ParseFloatError) -> ParseError
Converts to this type from the input type.
source§impl From<ParseIntError> for ParseError
impl From<ParseIntError> for ParseError
source§fn from(e: ParseIntError) -> ParseError
fn from(e: ParseIntError) -> ParseError
Converts to this type from the input type.
source§impl PartialEq<ParseError> for ParseError
impl PartialEq<ParseError> for ParseError
source§fn eq(&self, other: &ParseError) -> bool
fn eq(&self, other: &ParseError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for ParseError
Auto Trait Implementations§
impl RefUnwindSafe for ParseError
impl Send for ParseError
impl Sync for ParseError
impl Unpin for ParseError
impl UnwindSafe for ParseError
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more