pub struct DraftEdit {
pub from: Option<Option<Mailbox>>,
pub to: Option<Vec<Mailbox>>,
pub cc: Option<Vec<Mailbox>>,
pub bcc: Option<Vec<Mailbox>>,
pub subject: Option<String>,
pub body: Option<String>,
pub html_body: Option<String>,
pub attach: Vec<Attachment>,
pub remove_attachments: Vec<String>,
}Expand description
The changes to make to a draft’s message. A None or empty field leaves
that part of the message exactly as it is.
Fields§
§from: Option<Option<Mailbox>>Replaces the From mailbox. Some(None) removes the header, so
Gmail fills in the primary address and the account’s name. Checking
the mailbox against the account’s send-as aliases is the caller’s
job.
to: Option<Vec<Mailbox>>Replaces the whole To list. An empty list removes the header.
cc: Option<Vec<Mailbox>>Replaces the whole Cc list. An empty list removes the header.
bcc: Option<Vec<Mailbox>>Replaces the whole Bcc list. An empty list removes the header.
subject: Option<String>Replaces the Subject. An empty subject removes the header.
body: Option<String>Replaces the body with this plain text, or with html_body its
plain-text alternative.
html_body: Option<String>With body, replaces the body with a multipart/alternative of
body and this HTML. Deriving body from the HTML is the caller’s
job; an HTML body without body is refused.
attach: Vec<Attachment>Files to attach after the existing attachments.
remove_attachments: Vec<String>Existing attachments to remove, one per name. A name matches the
name gmail draft show lists (sanitised, with -N added to repeats
and attachment-N for an unnamed part), or failing that the stored
filename when exactly one attachment has it.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DraftEdit
impl RefUnwindSafe for DraftEdit
impl Send for DraftEdit
impl Sync for DraftEdit
impl Unpin for DraftEdit
impl UnsafeUnpin for DraftEdit
impl UnwindSafe for DraftEdit
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<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