pub enum JmapFilter<C> {
Operator(JmapFilterOperator<C>),
Condition(C),
}Expand description
A JMAP filter (RFC 8620 §5.5): a protocol-specific condition (e.g.
crate::rfc8621::email::query::JmapEmailFilter) or a logical
combinator.
untagged serde: presence of operator picks JmapFilterOperator.
Variants§
Operator(JmapFilterOperator<C>)
A logical combinator over sub-filters.
Condition(C)
A protocol-specific filter condition.
Implementations§
Source§impl<C> JmapFilter<C>
impl<C> JmapFilter<C>
Sourcepub fn and(conditions: Vec<JmapFilter<C>>) -> Self
pub fn and(conditions: Vec<JmapFilter<C>>) -> Self
Wraps conditions in an AND combinator.
Sourcepub fn or(conditions: Vec<JmapFilter<C>>) -> Self
pub fn or(conditions: Vec<JmapFilter<C>>) -> Self
Wraps conditions in an OR combinator.
Sourcepub fn not(conditions: Vec<JmapFilter<C>>) -> Self
pub fn not(conditions: Vec<JmapFilter<C>>) -> Self
Wraps conditions in a NOT combinator. Satisfied when no condition
matches (RFC 8620 §5.5), so a single-element vec models unary negation.
Trait Implementations§
Source§impl<C: Clone> Clone for JmapFilter<C>
impl<C: Clone> Clone for JmapFilter<C>
Source§fn clone(&self) -> JmapFilter<C>
fn clone(&self) -> JmapFilter<C>
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<C: Debug> Debug for JmapFilter<C>
impl<C: Debug> Debug for JmapFilter<C>
Source§impl<'de, C> Deserialize<'de> for JmapFilter<C>where
C: Deserialize<'de>,
impl<'de, C> Deserialize<'de> for JmapFilter<C>where
C: Deserialize<'de>,
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
Source§impl<C> From<C> for JmapFilter<C>
impl<C> From<C> for JmapFilter<C>
Auto Trait Implementations§
impl<C> Freeze for JmapFilter<C>where
C: Freeze,
impl<C> RefUnwindSafe for JmapFilter<C>where
C: RefUnwindSafe,
impl<C> Send for JmapFilter<C>where
C: Send,
impl<C> Sync for JmapFilter<C>where
C: Sync,
impl<C> Unpin for JmapFilter<C>where
C: Unpin,
impl<C> UnsafeUnpin for JmapFilter<C>where
C: UnsafeUnpin,
impl<C> UnwindSafe for JmapFilter<C>where
C: UnwindSafe,
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