pub struct Email {Show 24 fields
pub id: String,
pub blob_id: String,
pub thread_id: Option<String>,
pub mailbox_ids: HashMap<String, bool>,
pub keywords: HashMap<String, bool>,
pub size: u64,
pub received_at: DateTime<Utc>,
pub message_id: Option<Vec<String>>,
pub in_reply_to: Option<Vec<String>>,
pub references: Option<Vec<String>>,
pub sender: Option<Vec<EmailAddress>>,
pub from: Option<Vec<EmailAddress>>,
pub to: Option<Vec<EmailAddress>>,
pub cc: Option<Vec<EmailAddress>>,
pub bcc: Option<Vec<EmailAddress>>,
pub reply_to: Option<Vec<EmailAddress>>,
pub subject: Option<String>,
pub sent_at: Option<DateTime<Utc>>,
pub has_attachment: bool,
pub preview: Option<String>,
pub body_values: Option<HashMap<String, EmailBodyValue>>,
pub text_body: Option<Vec<EmailBodyPart>>,
pub html_body: Option<Vec<EmailBodyPart>>,
pub attachments: Option<Vec<EmailBodyPart>>,
}Expand description
Email object as defined in RFC 8621
Fields§
§id: StringUnique identifier for the email
blob_id: StringBlob ID for the raw RFC 5322 message
thread_id: Option<String>Thread ID
mailbox_ids: HashMap<String, bool>Mailbox IDs (map of mailbox ID to boolean)
keywords: HashMap<String, bool>Keywords/flags (e.g., $seen, $flagged, $draft)
size: u64Size in bytes
received_at: DateTime<Utc>Time email was received at the server
message_id: Option<Vec<String>>Message-ID header
in_reply_to: Option<Vec<String>>In-Reply-To header
references: Option<Vec<String>>References header
sender: Option<Vec<EmailAddress>>Sender header
from: Option<Vec<EmailAddress>>From header
to: Option<Vec<EmailAddress>>To header
cc: Option<Vec<EmailAddress>>Cc header
bcc: Option<Vec<EmailAddress>>Bcc header
reply_to: Option<Vec<EmailAddress>>Reply-To header
subject: Option<String>Subject header
sent_at: Option<DateTime<Utc>>Sent-At date from Date header
has_attachment: boolHas attachment
preview: Option<String>Preview text
body_values: Option<HashMap<String, EmailBodyValue>>Body values (for body parts)
text_body: Option<Vec<EmailBodyPart>>Text body parts
html_body: Option<Vec<EmailBodyPart>>HTML body parts
attachments: Option<Vec<EmailBodyPart>>Attachments
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Email
impl<'de> Deserialize<'de> for Email
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Email
impl RefUnwindSafe for Email
impl Send for Email
impl Sync for Email
impl Unpin for Email
impl UnsafeUnpin for Email
impl UnwindSafe for Email
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more