pub enum FieldCondition {
Show 13 variants
From {
pattern: StringMatch,
},
To {
pattern: StringMatch,
},
Subject {
pattern: StringMatch,
},
HasLabel {
label: String,
},
HasAttachment,
SizeGreaterThan {
bytes: u64,
},
SizeLessThan {
bytes: u64,
},
DateAfter {
date: DateTime<Utc>,
},
DateBefore {
date: DateTime<Utc>,
},
IsUnread,
IsStarred,
HasUnsubscribe,
BodyContains {
pattern: StringMatch,
},
}Expand description
Leaf-level condition against a single message field.
Variants§
From
Fields
§
pattern: StringMatchTo
Fields
§
pattern: StringMatchSubject
Fields
§
pattern: StringMatchHasLabel
HasAttachment
SizeGreaterThan
SizeLessThan
DateAfter
DateBefore
IsUnread
IsStarred
HasUnsubscribe
BodyContains
Fields
§
pattern: StringMatchImplementations§
Source§impl FieldCondition
impl FieldCondition
pub fn evaluate(&self, msg: &dyn MessageView) -> bool
Trait Implementations§
Source§impl Clone for FieldCondition
impl Clone for FieldCondition
Source§fn clone(&self) -> FieldCondition
fn clone(&self) -> FieldCondition
Returns a duplicate of the value. Read more
1.0.0 · 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 FieldCondition
impl Debug for FieldCondition
Source§impl<'de> Deserialize<'de> for FieldCondition
impl<'de> Deserialize<'de> for FieldCondition
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
Auto Trait Implementations§
impl Freeze for FieldCondition
impl RefUnwindSafe for FieldCondition
impl Send for FieldCondition
impl Sync for FieldCondition
impl Unpin for FieldCondition
impl UnsafeUnpin for FieldCondition
impl UnwindSafe for FieldCondition
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