Skip to main content

Message

Struct Message 

Source
pub struct Message {
Show 16 fields pub id: i64, pub mailbox_id: i64, pub uid: u32, pub sender: String, pub recipients: String, pub subject: String, pub date: i64, pub size: u32, pub flags: u32, pub internal_date: i64, pub message_id: String, pub in_reply_to: String, pub thread_id: String, pub user_address: String, pub new_content: Option<String>, pub blob_id: String,
}
Expand description

A single message as JMAP needs to see it for Email/get, Email/query, Email/set, Thread/get, and EmailSubmission/set.

JMAP-visible email id is msg-{id}.

Fields§

§id: i64

Store-native primary key. Rendered on the wire as msg-{id}.

§mailbox_id: i64

FK into the message’s containing mailbox.

§uid: u32

IMAP-style UID within mailbox_id. Combined with mailbox_id it uniquely identifies the row for flag updates.

§sender: String

Raw From: header value, may include a display name (e.g. "Alice" <alice@example.com>).

§recipients: String

Raw To: header value. Comma-separated address list.

§subject: String

Decoded Subject: header.

§date: i64

Date: header epoch seconds.

§size: u32

Message size in bytes.

§flags: u32

Flag bitmask. See the FLAG_* constants in this module.

§internal_date: i64

Internal delivery time epoch seconds.

§message_id: String

Message-ID: header value, without the angle brackets.

§in_reply_to: String

In-Reply-To: header value, without angle brackets, or empty when the message is not a reply.

§thread_id: String

Store-defined thread identifier, stable across all messages in the same conversation.

§user_address: String

Owner’s full address (used to read the raw bytes from a store).

§new_content: Option<String>

Optional pre-extracted plain-text snippet, used for preview.

§blob_id: String

Implementation-defined opaque id used by crate::store::MailStore::read_message_raw to locate the on-disk / blob copy of the message.

Trait Implementations§

Source§

impl Clone for Message

Source§

fn clone(&self) -> Message

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Message

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.