aboutsummaryrefslogtreecommitdiff
path: root/src/mail/uidindex.rs
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2024-01-05 17:46:16 +0100
committerQuentin Dufour <quentin@deuxfleurs.fr>2024-01-05 17:46:16 +0100
commitadf4d33f226a745330a3bb802fe9b96f263a0895 (patch)
tree28ba9871f00752998437c511f093b60c1b310bab /src/mail/uidindex.rs
parent335750a29a83edba9bce2fb7e1452001e4962d1f (diff)
downloadaerogramme-adf4d33f226a745330a3bb802fe9b96f263a0895.tar.gz
aerogramme-adf4d33f226a745330a3bb802fe9b96f263a0895.zip
added some utility structures
Diffstat (limited to 'src/mail/uidindex.rs')
-rw-r--r--src/mail/uidindex.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mail/uidindex.rs b/src/mail/uidindex.rs
index 956b194..01f8c9c 100644
--- a/src/mail/uidindex.rs
+++ b/src/mail/uidindex.rs
@@ -9,6 +9,7 @@ use crate::mail::unique_ident::UniqueIdent;
pub type ImapUid = NonZeroU32;
pub type ImapUidvalidity = NonZeroU32;
pub type Flag = String;
+pub type IndexEntry = (ImapUid, Vec<Flag>);
/// A UidIndex handles the mutable part of a mailbox
/// It is built by running the event log on it
@@ -18,7 +19,7 @@ pub type Flag = String;
#[derive(Clone)]
pub struct UidIndex {
// Source of trust
- pub table: OrdMap<UniqueIdent, (ImapUid, Vec<Flag>)>,
+ pub table: OrdMap<UniqueIdent, IndexEntry>,
// Indexes optimized for queries
pub idx_by_uid: OrdMap<ImapUid, UniqueIdent>,