mirror of https://github.com/terhechte/postsack
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
599 B
Rust
24 lines
599 B
Rust
mod meta;
|
|
mod raw_email;
|
|
|
|
use super::shared::filesystem::{emails_in, folders_in};
|
|
use super::{Config, ImporterFormat, MessageSender, Result};
|
|
use raw_email::RawEmailEntry;
|
|
|
|
#[derive(Default)]
|
|
pub struct Gmail {}
|
|
|
|
impl ImporterFormat for Gmail {
|
|
type Item = raw_email::RawEmailEntry;
|
|
|
|
fn default_path() -> Option<std::path::PathBuf> {
|
|
None
|
|
}
|
|
|
|
fn emails(&self, config: &Config, sender: MessageSender) -> Result<Vec<Self::Item>> {
|
|
folders_in(&config.emails_folder_path, sender, |path, sender| {
|
|
emails_in(path, sender, RawEmailEntry::new)
|
|
})
|
|
}
|
|
}
|