1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum MarcError {
5 #[error("invalid record: {0}")]
6 InvalidRecord(&'static str),
7
8 #[error("I/O error: {0}")]
9 Io(#[from] std::io::Error),
10
11 #[error("encoding error")]
12 Encoding,
13
14 #[error("XML error: {0}")]
15 Xml(String),
16}