use thiserror::Error;
#[derive(Error, Debug)]
#[non_exhaustive]
pub enum ParseError {
#[error("Failed to parse XML: {0}")]
XmlParseError(#[from] quick_xml::Error),
#[error("Failed to deserialize feed entry: {0}")]
DeserializeError(#[from] quick_xml::DeError),
#[error("Feed contains invalid UTF-8: {0}")]
Utf8Error(#[from] std::str::Utf8Error),
#[error("Failed to write intermediate XML: {0}")]
IoError(#[from] std::io::Error),
#[error("Invalid feed format: {0}")]
InvalidFeedFormat(String),
#[error("Missing required field: {0}")]
MissingField(String),
}
pub type ParseResult<T> = Result<T, ParseError>;