-
-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
Response
supports X-GM-Labels, that is the labeling system used by GMail.
Is it possible to expose the value in Fetch
?
/// Extract the `X-GM-LABELS` of a `FETCH` response
///
/// See [Access to Gmail labels: X-GM-LABELS](https://developers.google.com/gmail/imap/imap-extensions#access_to_labels_x-gm-labels)
/// for details.
pub fn gmail_labels(&self) -> Option<&Vec<Cow<'_, str>>> {
if let Response::Fetch(_, attrs) = self.response.parsed() {
attrs
.iter()
.filter_map(|av| match av {
AttributeValue::GmailLabels(gl) => Some(gl),
_ => None,
})
.next()
} else {
unreachable!()
}
}
Metadata
Metadata
Assignees
Labels
No labels