aboutsummaryrefslogtreecommitdiff
path: root/src/mail/user.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-06-29 13:41:05 +0200
committerAlex Auvolat <alex@adnab.me>2022-06-29 13:41:05 +0200
commit8b7eb1ca918d26901b0739526341128067ca1cbc (patch)
tree9bd9d8d4248f43a4f9dfaff7e5b83296f771463d /src/mail/user.rs
parent1bc109df72a3d785211a128b3f28746232258924 (diff)
downloadaerogramme-8b7eb1ca918d26901b0739526341128067ca1cbc.tar.gz
aerogramme-8b7eb1ca918d26901b0739526341128067ca1cbc.zip
work on prototypes
Diffstat (limited to 'src/mail/user.rs')
-rw-r--r--src/mail/user.rs25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/mail/user.rs b/src/mail/user.rs
index 7465ab0..4864509 100644
--- a/src/mail/user.rs
+++ b/src/mail/user.rs
@@ -25,7 +25,28 @@ impl User {
})
}
- pub fn open_mailbox(&self, name: String) -> Result<Mailbox> {
- Mailbox::new(&self.creds, name)
+ /// Lists user's available mailboxes
+ pub fn list_mailboxes(&self) -> Result<Vec<String>> {
+ unimplemented!()
+ }
+
+ /// Opens an existing mailbox given its IMAP name.
+ pub fn open_mailbox(&self, name: &str) -> Result<Option<Mailbox>> {
+ Mailbox::new(&self.creds, name).map(Some)
+ }
+
+ /// Creates a new mailbox in the user's IMAP namespace.
+ pub fn create_mailbox(&self, name: &str) -> Result<()> {
+ unimplemented!()
+ }
+
+ /// Deletes a mailbox in the user's IMAP namespace.
+ pub fn delete_mailbox(&self, name: &str) -> Result<()> {
+ unimplemented!()
+ }
+
+ /// Renames a mailbox in the user's IMAP namespace.
+ pub fn rename_mailbox(&self, old_name: &str, new_name: &str) -> Result<()> {
+ unimplemented!()
}
}