use std::io;
use mailparse::MailParseError;
use thiserror::Error;
use zip::result::ZipError;
#[derive(Error, Debug)]
pub enum Error {
#[error(transparent)]
Io(#[from] io::Error),
#[error(transparent)]
MailParse(#[from] MailParseError),
#[error(transparent)]
Zip(#[from] ZipError),
#[error("metadata field {0} not found")]
FieldNotFound(&'static str),
#[error("unknown distribution type")]
UnknownDistributionType,
#[error("metadata file not found")]
MetadataNotFound,
#[error("found multiple metadata files: {0:?}")]
MultipleMetadataFiles(Vec<String>),
}