pub struct JmapEmailPatch(pub Vec<JmapEmailPatchOp>);Expand description
A set of patch operations applied to a single email in Email/set.
Serializes to a flat JSON Merge Patch object (RFC 7396).
Tuple Fields§
§0: Vec<JmapEmailPatchOp>Implementations§
Source§impl JmapEmailPatch
impl JmapEmailPatch
Sourcepub fn set_keyword(self, keyword: impl Into<String>) -> Self
pub fn set_keyword(self, keyword: impl Into<String>) -> Self
Appends a JmapEmailPatchOp::SetKeyword operation.
Sourcepub fn unset_keyword(self, keyword: impl Into<String>) -> Self
pub fn unset_keyword(self, keyword: impl Into<String>) -> Self
Appends a JmapEmailPatchOp::UnsetKeyword operation.
Sourcepub fn replace_keywords(self, keywords: BTreeMap<String, bool>) -> Self
pub fn replace_keywords(self, keywords: BTreeMap<String, bool>) -> Self
Appends a JmapEmailPatchOp::ReplaceKeywords operation.
Sourcepub fn add_to_mailbox(self, id: impl Into<String>) -> Self
pub fn add_to_mailbox(self, id: impl Into<String>) -> Self
Appends a JmapEmailPatchOp::AddToMailbox operation.
Sourcepub fn remove_from_mailbox(self, id: impl Into<String>) -> Self
pub fn remove_from_mailbox(self, id: impl Into<String>) -> Self
Appends a JmapEmailPatchOp::RemoveFromMailbox operation.
Sourcepub fn replace_mailbox_ids(self, ids: BTreeMap<String, bool>) -> Self
pub fn replace_mailbox_ids(self, ids: BTreeMap<String, bool>) -> Self
Appends a JmapEmailPatchOp::ReplaceMailboxIds operation.
Trait Implementations§
Source§impl Clone for JmapEmailPatch
impl Clone for JmapEmailPatch
Source§fn clone(&self) -> JmapEmailPatch
fn clone(&self) -> JmapEmailPatch
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 JmapEmailPatch
impl Debug for JmapEmailPatch
Source§impl Default for JmapEmailPatch
impl Default for JmapEmailPatch
Source§fn default() -> JmapEmailPatch
fn default() -> JmapEmailPatch
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for JmapEmailPatch
impl RefUnwindSafe for JmapEmailPatch
impl Send for JmapEmailPatch
impl Sync for JmapEmailPatch
impl Unpin for JmapEmailPatch
impl UnsafeUnpin for JmapEmailPatch
impl UnwindSafe for JmapEmailPatch
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