Initial commit

This commit is contained in:
Maurus Decimus
2026-05-29 18:02:15 +02:00
commit 576073f8c9
263 changed files with 78638 additions and 0 deletions
+46
View File
@@ -0,0 +1,46 @@
/*
* SPDX-FileCopyrightText: 2020 Stalwart Labs LLC <[email protected]>
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*/
use indexmap::IndexMap;
use serde::{Deserialize, Serialize};
use super::{JmapId, UtcDate};
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Email {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub id: Option<JmapId>,
pub blob_id: JmapId,
#[serde(with = "time::serde::rfc3339")]
pub received_at: UtcDate,
pub mailbox_ids: IndexMap<JmapId, bool>,
pub keywords: IndexMap<String, bool>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct EmailImport {
pub blob_id: JmapId,
pub mailbox_ids: IndexMap<JmapId, bool>,
#[serde(default, skip_serializing_if = "IndexMap::is_empty")]
pub keywords: IndexMap<String, bool>,
#[serde(
default,
with = "time::serde::rfc3339::option",
skip_serializing_if = "Option::is_none"
)]
pub received_at: Option<UtcDate>,
}