aboutsummaryrefslogtreecommitdiff
path: root/src/imap/command/selected.rs
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2022-06-30 13:36:21 +0200
committerQuentin Dufour <quentin@deuxfleurs.fr>2022-06-30 13:36:39 +0200
commit0f0a8d415e45df178778260d3be1b83ab2785675 (patch)
treed92d0dea55a7dafcbf85377163dfcbb889008a10 /src/imap/command/selected.rs
parent69428eaf257db396ae72007aa78d40406c29407c (diff)
downloadaerogramme-0f0a8d415e45df178778260d3be1b83ab2785675.tar.gz
aerogramme-0f0a8d415e45df178778260d3be1b83ab2785675.zip
Implement RFC822.TEXT
Diffstat (limited to 'src/imap/command/selected.rs')
-rw-r--r--src/imap/command/selected.rs22
1 files changed, 9 insertions, 13 deletions
diff --git a/src/imap/command/selected.rs b/src/imap/command/selected.rs
index b8598f5..a447a49 100644
--- a/src/imap/command/selected.rs
+++ b/src/imap/command/selected.rs
@@ -2,9 +2,9 @@ use anyhow::Result;
use boitalettres::proto::Request;
use boitalettres::proto::Response;
use imap_codec::types::command::CommandBody;
-use imap_codec::types::mailbox::{Mailbox as MailboxCodec};
-use imap_codec::types::flag::{Flag, StoreType, StoreResponse};
use imap_codec::types::fetch_attributes::MacroOrFetchAttributes;
+use imap_codec::types::flag::{Flag, StoreResponse, StoreType};
+use imap_codec::types::mailbox::Mailbox as MailboxCodec;
use imap_codec::types::sequence::SequenceSet;
@@ -27,11 +27,11 @@ pub async fn dispatch<'a>(ctx: SelectedContext<'a>) -> Result<(Response, flow::T
CommandBody::Close => ctx.close().await,
CommandBody::Expunge => ctx.expunge().await,
CommandBody::Store {
- sequence_set,
- kind,
- response,
- flags,
- uid
+ sequence_set,
+ kind,
+ response,
+ flags,
+ uid,
} => ctx.store(sequence_set, kind, response, flags, uid).await,
CommandBody::Copy {
sequence_set,
@@ -52,18 +52,14 @@ pub async fn dispatch<'a>(ctx: SelectedContext<'a>) -> Result<(Response, flow::T
// --- PRIVATE ---
impl<'a> SelectedContext<'a> {
- async fn close(
- self,
- ) -> Result<(Response, flow::Transition)> {
+ async fn close(self) -> Result<(Response, flow::Transition)> {
// We expunge messages,
// but we don't send the untagged EXPUNGE responses
self.expunge().await?;
Ok((Response::ok("CLOSE completed")?, flow::Transition::Unselect))
}
- async fn expunge(
- self,
- ) -> Result<(Response, flow::Transition)> {
+ async fn expunge(self) -> Result<(Response, flow::Transition)> {
Ok((Response::bad("Not implemented")?, flow::Transition::None))
}