This commit is contained in:
2023-07-15 16:58:15 -07:00
parent 458bd356dd
commit 39bef1ea87
3 changed files with 51 additions and 8 deletions

View File

@@ -15,5 +15,21 @@ pub struct ShowResult {
messages: Vec<Message>,
}
#[derive(Serialize, Deserialize, Debug)]
pub enum Message {}
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<String>,
pub cc: Option<String>,
pub timestamp: UnixTime, // date header as unix time
pub date_relative: String, // user-friendly timestamp
pub tags: Vec<String>,
// HTML formatted body
pub body: String,
pub attachment: Vec<AttachementId>,
}