From 497ad4b5eae7a2ddf3d7a945313c478d23414249 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Thu, 30 Jun 2022 11:28:03 +0200 Subject: Split out Examined state and add prototypes for IMAP command handlers --- src/imap/mailbox_view.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/imap/mailbox_view.rs') 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> { + /// responses describing the changes. + pub async fn sync_update(&mut self) -> Result> { 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> { let new_view = MailboxView { mailbox: self.mailbox.clone(), known_state: self.mailbox.current_uid_index().await, -- cgit v1.2.3