1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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>),
}