added passing back the email data

This commit is contained in:
Shaun Savage 2018-06-28 15:53:37 +00:00
parent ba8afa7918
commit 4a855720e4
2 changed files with 3 additions and 0 deletions

View file

@ -84,6 +84,7 @@ pub fn parse_fetches(lines: Vec<u8>) -> ZeroCopyResult<Vec<Fetch>> {
uid: None,
rfc822_header: None,
rfc822: None,
email: None,
};
for attr in attrs {
@ -95,6 +96,7 @@ pub fn parse_fetches(lines: Vec<u8>) -> ZeroCopyResult<Vec<Fetch>> {
AttributeValue::Uid(uid) => fetch.uid = Some(uid),
AttributeValue::Rfc822(rfc) => fetch.rfc822 = rfc,
AttributeValue::Rfc822Header(rfc) => fetch.rfc822_header = rfc,
AttributeValue::BodySection {section, index, data} => fetch.email = data,
_ => {}
}
}

View file

@ -7,6 +7,7 @@ pub struct Fetch {
pub uid: Option<u32>,
pub(crate) rfc822_header: Option<&'static [u8]>,
pub(crate) rfc822: Option<&'static [u8]>,
pub email: Option<&'static [u8]>,
}
impl Fetch {