pub struct Thread {
pub id: ThreadId,
pub grant_id: GrantId,
pub subject: Option<String>,
pub participants: Vec<EmailAddress>,
pub message_ids: Vec<String>,
pub draft_ids: Vec<String>,
pub folders: Vec<String>,
pub snippet: Option<String>,
pub starred: Option<bool>,
pub unread: Option<bool>,
pub latest_draft_or_message: Option<i64>,
pub has_attachments: Option<bool>,
}Expand description
An email thread (conversation).
Threads group related messages together based on subject and participants.
§Example
let thread = Thread {
id: ThreadId::new("thread_123"),
grant_id: GrantId::new("grant_456"),
subject: Some("Project Discussion".to_string()),
participants: vec![],
message_ids: vec![],
draft_ids: vec![],
folders: vec![],
snippet: Some("Let's discuss the project timeline...".to_string()),
starred: Some(false),
unread: Some(false),
latest_draft_or_message: None,
has_attachments: Some(false),
};Fields§
§id: ThreadIdUnique identifier for the thread.
grant_id: GrantIdGrant ID this thread belongs to.
subject: Option<String>Subject of the thread.
participants: Vec<EmailAddress>Participants in the thread.
message_ids: Vec<String>IDs of messages in this thread.
draft_ids: Vec<String>IDs of drafts in this thread.
folders: Vec<String>Folder IDs this thread belongs to.
snippet: Option<String>Text snippet from the thread.
starred: Option<bool>Whether the thread is starred.
unread: Option<bool>Whether the thread has unread messages.
latest_draft_or_message: Option<i64>Unix timestamp of the latest message or draft.
has_attachments: Option<bool>Whether the thread has attachments.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Thread
impl<'de> Deserialize<'de> for Thread
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
impl Eq for Thread
impl StructuralPartialEq for Thread
Auto Trait Implementations§
impl Freeze for Thread
impl RefUnwindSafe for Thread
impl Send for Thread
impl Sync for Thread
impl Unpin for Thread
impl UnsafeUnpin for Thread
impl UnwindSafe for Thread
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