email-lib 0.27.0

Cross-platform, asynchronous Rust library to manage emails
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#[cfg(feature = "imap")]
pub mod imap;
#[cfg(feature = "maildir")]
pub mod maildir;
#[cfg(feature = "notmuch")]
pub mod notmuch;

use async_trait::async_trait;

use super::{Envelope, SingleId};
use crate::AnyResult;

#[async_trait]
pub trait GetEnvelope: Send + Sync {
    /// Get the envelope from the given folder matching the given id.
    async fn get_envelope(&self, folder: &str, id: &SingleId) -> AnyResult<Envelope>;
}