dmarc_report_parser/error.rs
1use thiserror::Error;
2
3/// Errors that can occur while parsing a DMARC aggregate report.
4#[derive(Debug, Error)]
5pub enum Error {
6 /// The XML is malformed or does not conform to the DMARC report schema.
7 #[error("failed to parse DMARC report XML: {0}")]
8 Parse(#[from] quick_xml::DeError),
9
10 /// The input bytes are not valid UTF-8.
11 #[error("input is not valid UTF-8: {0}")]
12 Utf8(#[from] std::str::Utf8Error),
13}