aboutsummaryrefslogtreecommitdiff
path: root/src/service.rs
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2022-06-07 13:46:13 +0200
committerQuentin Dufour <quentin@deuxfleurs.fr>2022-06-07 13:46:13 +0200
commitcbcc339d50fc2c30e51776c3a60818190ffb4f23 (patch)
tree268938d6c45b1323cea34949c6712f544d9ac00e /src/service.rs
parent93f943aa802163eb47feef592c1504112e4588c5 (diff)
downloadaerogramme-cbcc339d50fc2c30e51776c3a60818190ffb4f23.tar.gz
aerogramme-cbcc339d50fc2c30e51776c3a60818190ffb4f23.zip
Start implementing other endpoints
Diffstat (limited to 'src/service.rs')
-rw-r--r--src/service.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/service.rs b/src/service.rs
index 4d4c288..a2fca4d 100644
--- a/src/service.rs
+++ b/src/service.rs
@@ -12,6 +12,7 @@ use tower::Service;
use crate::command;
use crate::login::Credentials;
use crate::mailstore::Mailstore;
+use crate::mailbox::Mailbox;
pub struct Instance {
pub mailstore: Arc<Mailstore>,
@@ -39,6 +40,7 @@ impl<'a> Service<&'a AddrStream> for Instance {
pub struct Session {
pub creds: Option<Credentials>,
+ pub selected: Option<Mailbox>,
}
pub struct Connection {
@@ -47,7 +49,7 @@ pub struct Connection {
}
impl Connection {
pub fn new(mailstore: Arc<Mailstore>) -> Self {
- Self { mailstore, session: Arc::new(Mutex::new(Session { creds: None })) }
+ Self { mailstore, session: Arc::new(Mutex::new(Session { creds: None, selected: None, })) }
}
}
impl Service<Request> for Connection {