aboutsummaryrefslogtreecommitdiff
path: root/src/mail/snapshot.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/mail/snapshot.rs')
-rw-r--r--src/mail/snapshot.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mail/snapshot.rs b/src/mail/snapshot.rs
index 54bec64..c3145b4 100644
--- a/src/mail/snapshot.rs
+++ b/src/mail/snapshot.rs
@@ -4,6 +4,8 @@ use anyhow::Result;
use super::mailbox::Mailbox;
use super::uidindex::UidIndex;
+use super::unique_ident::UniqueIdent;
+use super::query::{Query, QueryScope};
/// A Frozen Mailbox has a snapshot of the current mailbox
/// state that is desynchronized with the real mailbox state.
@@ -49,4 +51,12 @@ impl FrozenMailbox {
old_snapshot
}
+
+ pub fn query<'a, 'b>(&'a self, uuids: &'b [UniqueIdent], scope: QueryScope) -> Query<'a, 'b> {
+ Query {
+ frozen: self,
+ emails: uuids,
+ scope,
+ }
+ }
}