use notmuch::SearchSummary; use serde::{Deserialize, Serialize}; #[derive(Serialize, Deserialize, Debug)] pub struct SearchResult { pub summary: SearchSummary, pub query: String, pub page: usize, pub results_per_page: usize, pub total: usize, } #[derive(Serialize, Deserialize, Debug)] pub struct ShowResult { messages: Vec, } pub type AttachementId = String; /// # Number of seconds since the Epoch pub type UnixTime = isize; #[derive(Serialize, Deserialize, Debug, Default)] pub struct Message { pub from: String, pub to: Option, pub cc: Option, pub timestamp: UnixTime, // date header as unix time pub date_relative: String, // user-friendly timestamp pub tags: Vec, // HTML formatted body pub body: String, pub attachment: Vec, }