diff options
author | Alex Auvolat <alex@adnab.me> | 2022-06-30 11:28:03 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-06-30 11:28:03 +0200 |
commit | 497ad4b5eae7a2ddf3d7a945313c478d23414249 (patch) | |
tree | fa0ca569cfd41a5cc12547f3f83395b6324b9bd7 /src/imap/mailbox_view.rs | |
parent | 4adaa988aa775b0b5303501b3c8c23921b13f76b (diff) | |
download | aerogramme-497ad4b5eae7a2ddf3d7a945313c478d23414249.tar.gz aerogramme-497ad4b5eae7a2ddf3d7a945313c478d23414249.zip |
Split out Examined state and add prototypes for IMAP command handlers
Diffstat (limited to 'src/imap/mailbox_view.rs')
-rw-r--r-- | src/imap/mailbox_view.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/imap/mailbox_view.rs b/src/imap/mailbox_view.rs index e1ea516..58e71a2 100644 --- a/src/imap/mailbox_view.rs +++ b/src/imap/mailbox_view.rs @@ -66,12 +66,18 @@ impl MailboxView { } /// Looks up state changes in the mailbox and produces a set of IMAP - /// responses describing the new state. - pub async fn update(&mut self) -> Result<Vec<Body>> { + /// responses describing the changes. + pub async fn sync_update(&mut self) -> Result<Vec<Body>> { self.mailbox.sync().await?; // TODO THIS IS JUST A TEST REMOVE LATER self.mailbox.test().await?; + self.update().await + } + + /// Produces a set of IMAP responses describing the change between + /// what the client knows and what is actually in the mailbox. + pub async fn update(&mut self) -> Result<Vec<Body>> { let new_view = MailboxView { mailbox: self.mailbox.clone(), known_state: self.mailbox.current_uid_index().await, |