#[non_exhaustive]pub enum Expr {
Predicate(Predicate),
And(Vec<Expr>),
Or(Vec<Expr>),
Not(Box<Expr>),
LinksTo(LinkPredicate),
LinkedFrom(LinkPredicate),
}Expand description
A composable filter expression. The AST root for vault queries.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Predicate(Predicate)
A frontmatter or virtual-field predicate.
And(Vec<Expr>)
All sub-expressions must hold.
Or(Vec<Expr>)
At least one sub-expression must hold.
Not(Box<Expr>)
Negation of a sub-expression.
LinksTo(LinkPredicate)
Records that link out to a target matching the inner predicate.
LinkedFrom(LinkPredicate)
Records linked from anything matching the inner predicate.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Expr
impl<'de> Deserialize<'de> for Expr
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
impl StructuralPartialEq for Expr
Auto Trait Implementations§
impl Freeze for Expr
impl RefUnwindSafe for Expr
impl Send for Expr
impl Sync for Expr
impl Unpin for Expr
impl UnsafeUnpin for Expr
impl UnwindSafe for Expr
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