summaryrefslogtreecommitdiffstats
path: root/src/mail.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/mail.rs')
-rw-r--r--src/mail.rs25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/mail.rs b/src/mail.rs
index 6e99cc5..c818a3d 100644
--- a/src/mail.rs
+++ b/src/mail.rs
@@ -33,28 +33,3 @@ impl Mail {
}
-#[derive(Clone, Debug)]
-pub struct UnparsedMail {
- id: String,
- buffer: Vec<u8>,
-}
-
-impl UnparsedMail {
- pub fn read_from_path(id: String, pb: PathBuf) -> Result<Self> {
- std::fs::read(pb)
- .map_err(Error::from)
- .map(|buffer| UnparsedMail { id, buffer })
- }
-
- pub fn parse(self) -> Result<Mail> {
- Ok(Mail {
- id: self.id,
- parsed: mailparse::parse_mail(self.buffer.clone())?,
- buffer: self.buffer,
- })
- }
-
- pub fn id(&self) -> &String {
- &self.id
- }
-}