diff options
author | Quentin <quentin@dufour.io> | 2024-01-19 14:04:03 +0000 |
---|---|---|
committer | Quentin <quentin@dufour.io> | 2024-01-19 14:04:03 +0000 |
commit | 0f227e44e4996e54d2e55ed5c7a07f5458c4db4f (patch) | |
tree | 7f6c4fec623d0d99d3f09e752a360ca0f806429e /src/imap/response.rs | |
parent | 55e26d24a08519ded6a6898453dcd6db287f45c8 (diff) | |
parent | 23aa313e11f344da07143d60ce446b5f23d5f362 (diff) | |
download | aerogramme-0f227e44e4996e54d2e55ed5c7a07f5458c4db4f.tar.gz aerogramme-0f227e44e4996e54d2e55ed5c7a07f5458c4db4f.zip |
Merge pull request 'Implement IDLE' (#72) from feat/idle into main
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/aerogramme/pulls/72
Diffstat (limited to 'src/imap/response.rs')
-rw-r--r-- | src/imap/response.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/imap/response.rs b/src/imap/response.rs index d20e58e..40e6927 100644 --- a/src/imap/response.rs +++ b/src/imap/response.rs @@ -2,7 +2,10 @@ use anyhow::Result; use imap_codec::imap_types::command::Command; use imap_codec::imap_types::core::Tag; use imap_codec::imap_types::response::{Code, Data, Status}; +use std::sync::Arc; +use tokio::sync::Notify; +#[derive(Debug)] pub enum Body<'a> { Data(Data<'a>), Status(Status<'a>), @@ -88,6 +91,7 @@ impl<'a> ResponseBuilder<'a> { } } +#[derive(Debug)] pub struct Response<'a> { pub body: Vec<Body<'a>>, pub completion: Status<'a>, @@ -110,3 +114,10 @@ impl<'a> Response<'a> { }) } } + +#[derive(Debug)] +pub enum ResponseOrIdle { + Response(Response<'static>), + StartIdle(Arc<Notify>), + IdleEvent(Vec<Body<'static>>), +} |