diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-01-05 18:59:19 +0100 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-01-05 18:59:19 +0100 |
commit | 4806f7ff84c595ec6647744577388fe4fab33736 (patch) | |
tree | a4d3c0eebb9a40872449695e651b8f7df1d54d07 /src/mail/snapshot.rs | |
parent | adf4d33f226a745330a3bb802fe9b96f263a0895 (diff) | |
download | aerogramme-4806f7ff84c595ec6647744577388fe4fab33736.tar.gz aerogramme-4806f7ff84c595ec6647744577388fe4fab33736.zip |
WIP rewrite with a query managerfeat/more-imap-qol
Diffstat (limited to 'src/mail/snapshot.rs')
-rw-r--r-- | src/mail/snapshot.rs | 10 |
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, + } + } } |