pub enum CompiledExpr {
Not(Box<CompiledExpr>),
Union(Box<CompiledExpr>, Box<CompiledExpr>),
Intersection(Box<CompiledExpr>, Box<CompiledExpr>),
Set(FiltersetLeaf),
}Variants§
Not(Box<CompiledExpr>)
Accepts every test not in the given expression
Union(Box<CompiledExpr>, Box<CompiledExpr>)
Accepts every test in either given expression
Intersection(Box<CompiledExpr>, Box<CompiledExpr>)
Accepts every test in both given expressions
Set(FiltersetLeaf)
Accepts every test in a set
Implementations§
Source§impl CompiledExpr
impl CompiledExpr
Sourcepub fn matches_binary(
&self,
query: &BinaryQuery<'_>,
cx: &EvalContext<'_>,
) -> Option<bool>
pub fn matches_binary( &self, query: &BinaryQuery<'_>, cx: &EvalContext<'_>, ) -> Option<bool>
Returns a value indicating if the given binary is accepted by this filterset.
The value is:
Some(true)if this binary is definitely accepted by this filterset.Some(false)if this binary is definitely not accepted.Noneif this binary might or might not be accepted.
Sourcepub fn matches_test(&self, query: &TestQuery<'_>, cx: &EvalContext<'_>) -> bool
pub fn matches_test(&self, query: &TestQuery<'_>, cx: &EvalContext<'_>) -> bool
Returns true if the given test is accepted by this filterset.
If a group() predicate is encountered, this method panics.
Only use this for expressions that are guaranteed group-free
(i.e. compiled with any FiltersetKind other than
FiltersetKind::Test, or Test expressions where
has_group_matchers returns false).
Sourcepub fn matches_test_with_groups(
&self,
query: &TestQuery<'_>,
cx: &EvalContext<'_>,
groups: &dyn GroupLookup,
) -> bool
pub fn matches_test_with_groups( &self, query: &TestQuery<'_>, cx: &EvalContext<'_>, groups: &dyn GroupLookup, ) -> bool
Returns true if the given test is accepted by this filterset,
resolving group() predicates via the provided lookup.
Use this for FiltersetKind::Test expressions that contain
group() predicates.
Sourcepub fn has_group_matchers(&self) -> bool
pub fn has_group_matchers(&self) -> bool
Returns true if this expression contains any group() predicates.
Trait Implementations§
Source§impl Clone for CompiledExpr
impl Clone for CompiledExpr
Source§fn clone(&self) -> CompiledExpr
fn clone(&self) -> CompiledExpr
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CompiledExpr
impl Debug for CompiledExpr
Source§impl PartialEq for CompiledExpr
impl PartialEq for CompiledExpr
impl Eq for CompiledExpr
impl StructuralPartialEq for CompiledExpr
Auto Trait Implementations§
impl Freeze for CompiledExpr
impl RefUnwindSafe for CompiledExpr
impl Send for CompiledExpr
impl Sync for CompiledExpr
impl Unpin for CompiledExpr
impl UnsafeUnpin for CompiledExpr
impl UnwindSafe for CompiledExpr
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more