pub struct DraftSummary {
pub draft_id: String,
pub message_id: String,
pub thread_id: String,
pub to: String,
pub cc: String,
pub bcc: String,
pub subject: String,
pub date: String,
pub snippet: String,
}Expand description
A draft enriched with the headers a draft-list row needs.
Not a Gmail wire type: drafts.list only returns {id, message: {id, threadId}}, so this is assembled client-side by
DraftsApi::list_summaries from one messages.get(format=metadata) per
draft. The two ids are named draft_id and message_id rather than a
bare id so machine output can’t confuse them: every drafts endpoint is
addressed by the draft id, and the message id changes every time the
draft is saved.
Fields§
§draft_id: StringGmail draft id.
message_id: StringId of the draft’s current message.
thread_id: StringId of the thread the draft’s message belongs to.
to: StringThe To header, or empty if absent.
cc: StringThe Cc header, or empty if absent.
bcc: StringThe Bcc header, or empty if absent.
subject: StringThe Subject header, or empty if absent.
date: StringThe Date header, or empty if absent.
snippet: StringA short, plain-text snippet of the draft’s body.
Implementations§
Source§impl DraftSummary
impl DraftSummary
Sourcepub fn from_draft(draft: &Draft, message: &Message) -> Self
pub fn from_draft(draft: &Draft, message: &Message) -> Self
Builds a row from a listed draft and its hydrated message.
The message and thread ids come from the hydrated message when it carries them, falling back to the listing’s.
Trait Implementations§
Source§impl Clone for DraftSummary
impl Clone for DraftSummary
Source§impl Debug for DraftSummary
impl Debug for DraftSummary
Source§impl Default for DraftSummary
impl Default for DraftSummary
impl Eq for DraftSummary
Source§impl PartialEq for DraftSummary
impl PartialEq for DraftSummary
Source§impl Serialize for DraftSummary
impl Serialize for DraftSummary
impl StructuralPartialEq for DraftSummary
Auto Trait Implementations§
impl Freeze for DraftSummary
impl RefUnwindSafe for DraftSummary
impl Send for DraftSummary
impl Sync for DraftSummary
impl Unpin for DraftSummary
impl UnsafeUnpin for DraftSummary
impl UnwindSafe for DraftSummary
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> ⓘ
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> ⓘ
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