aboutsummaryrefslogtreecommitdiff
path: root/src/mail/query.rs
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2024-01-06 11:07:53 +0100
committerQuentin Dufour <quentin@deuxfleurs.fr>2024-01-06 11:07:53 +0100
commita84ba4d42fcdb38be514178eb9fced777ba76055 (patch)
treea58b8e9b3528294b084c2eb2fe37f28128437bc8 /src/mail/query.rs
parent4806f7ff84c595ec6647744577388fe4fab33736 (diff)
downloadaerogramme-a84ba4d42fcdb38be514178eb9fced777ba76055.tar.gz
aerogramme-a84ba4d42fcdb38be514178eb9fced777ba76055.zip
Mailbox View made more readable
Diffstat (limited to 'src/mail/query.rs')
-rw-r--r--src/mail/query.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mail/query.rs b/src/mail/query.rs
index 5beff37..70feb89 100644
--- a/src/mail/query.rs
+++ b/src/mail/query.rs
@@ -13,6 +13,7 @@ pub struct Query<'a,'b> {
pub scope: QueryScope,
}
+#[allow(dead_code)]
pub enum QueryScope {
Index,
Partial,
@@ -106,6 +107,7 @@ impl<'a> QueryResult<'a> {
}
}
+ #[allow(dead_code)]
pub fn index(&self) -> &IndexEntry {
match self {
Self::IndexResult { index, .. } => index,
@@ -114,7 +116,7 @@ impl<'a> QueryResult<'a> {
}
}
- pub fn metadata(&self) -> Option<&MailMeta> {
+ pub fn metadata(&'a self) -> Option<&'a MailMeta> {
match self {
Self::IndexResult { .. } => None,
Self::PartialResult { metadata, .. } => Some(metadata),
@@ -122,7 +124,8 @@ impl<'a> QueryResult<'a> {
}
}
- pub fn content(&self) -> Option<&[u8]> {
+ #[allow(dead_code)]
+ pub fn content(&'a self) -> Option<&'a [u8]> {
match self {
Self::FullResult { content, .. } => Some(content),
_ => None,