pub struct JmapEmailSetArgs {
pub create: Option<BTreeMap<String, JmapEmail>>,
pub update: Option<BTreeMap<String, JmapEmailPatch>>,
pub destroy: Option<Vec<String>>,
}Expand description
Arguments for an Email/set request.
Fields§
§create: Option<BTreeMap<String, JmapEmail>>Objects to create (client ID → partial email object).
update: Option<BTreeMap<String, JmapEmailPatch>>Objects to update (email ID → patch).
destroy: Option<Vec<String>>IDs to destroy (delete).
Implementations§
Source§impl JmapEmailSetArgs
impl JmapEmailSetArgs
Sourcepub fn create(
&mut self,
client_id: impl Into<String>,
email: JmapEmail,
) -> &mut Self
pub fn create( &mut self, client_id: impl Into<String>, email: JmapEmail, ) -> &mut Self
Queue an email for creation under the given client-chosen ID.
Sourcepub fn destroy(&mut self, id: impl Into<String>) -> &mut Self
pub fn destroy(&mut self, id: impl Into<String>) -> &mut Self
Queue an email ID for destruction.
Sourcepub fn set_keyword(
&mut self,
id: impl Into<String>,
keyword: impl Into<String>,
) -> &mut Self
pub fn set_keyword( &mut self, id: impl Into<String>, keyword: impl Into<String>, ) -> &mut Self
Queues a patch setting a keyword on the email with the given id.
Sourcepub fn unset_keyword(
&mut self,
id: impl Into<String>,
keyword: impl Into<String>,
) -> &mut Self
pub fn unset_keyword( &mut self, id: impl Into<String>, keyword: impl Into<String>, ) -> &mut Self
Queues a patch unsetting a keyword on the email with the given id.
Sourcepub fn replace_keywords(
&mut self,
id: impl Into<String>,
keywords: BTreeMap<String, bool>,
) -> &mut Self
pub fn replace_keywords( &mut self, id: impl Into<String>, keywords: BTreeMap<String, bool>, ) -> &mut Self
Queues a patch replacing all keywords of the email with the given id.
Sourcepub fn add_to_mailbox(
&mut self,
id: impl Into<String>,
mailbox_id: impl Into<String>,
) -> &mut Self
pub fn add_to_mailbox( &mut self, id: impl Into<String>, mailbox_id: impl Into<String>, ) -> &mut Self
Queues a patch adding the email with the given id to a mailbox.
Trait Implementations§
Source§impl Clone for JmapEmailSetArgs
impl Clone for JmapEmailSetArgs
Source§fn clone(&self) -> JmapEmailSetArgs
fn clone(&self) -> JmapEmailSetArgs
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for JmapEmailSetArgs
impl Debug for JmapEmailSetArgs
Source§impl Default for JmapEmailSetArgs
impl Default for JmapEmailSetArgs
Source§fn default() -> JmapEmailSetArgs
fn default() -> JmapEmailSetArgs
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for JmapEmailSetArgs
impl RefUnwindSafe for JmapEmailSetArgs
impl Send for JmapEmailSetArgs
impl Sync for JmapEmailSetArgs
impl Unpin for JmapEmailSetArgs
impl UnsafeUnpin for JmapEmailSetArgs
impl UnwindSafe for JmapEmailSetArgs
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