#[non_exhaustive]pub enum MpdError {
InvalidUtf8 {
valid_up_to: usize,
},
Xml {
pos: usize,
message: String,
},
NotMpd {
found: String,
},
Invalid {
what: &'static str,
detail: String,
},
TooLarge {
limit: Limit,
max: usize,
},
Unsupported(Unsupported),
}Expand description
Why an MPD document was rejected.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
InvalidUtf8
The bytes are not UTF-8.
Xml
The document is not well-formed XML (or uses a construct this parser refuses, such as a DOCTYPE).
NotMpd
The root element is not MPD in the MPD namespace.
Invalid
An attribute or element violates the schema rules the core relies on.
Fields
TooLarge
A hostile-input bound was exceeded.
Unsupported(Unsupported)
A feature outside the 0.1 scope.
Trait Implementations§
impl Eq for MpdError
Source§impl Error for MpdError
impl Error for MpdError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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()
impl StructuralPartialEq for MpdError
Auto Trait Implementations§
impl Freeze for MpdError
impl RefUnwindSafe for MpdError
impl Send for MpdError
impl Sync for MpdError
impl Unpin for MpdError
impl UnsafeUnpin for MpdError
impl UnwindSafe for MpdError
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