#[derive(Debug, thiserror::Error)]
pub enum XmltvError {
#[error("XML error: {0}")]
Xml(String),
#[error("invalid timestamp: {0}")]
Timestamp(String),
#[error("I/O error: {0}")]
Io(#[from] std::io::Error),
#[error("decompression error: {0}")]
Decompression(String),
}
impl From<quick_xml::Error> for XmltvError {
fn from(e: quick_xml::Error) -> Self {
Self::Xml(e.to_string())
}
}
impl From<quick_xml::events::attributes::AttrError> for XmltvError {
fn from(e: quick_xml::events::attributes::AttrError) -> Self {
Self::Xml(e.to_string())
}
}