pub struct Filterset {
pub input: String,
pub parsed: ParsedExpr,
pub compiled: CompiledExpr,
}Expand description
A filterset that has been parsed and compiled.
Used to filter tests to run.
Fields§
§input: StringThe raw expression passed in.
parsed: ParsedExprThe parsed-but-not-compiled expression.
compiled: CompiledExprThe compiled expression.
Implementations§
Source§impl Filterset
impl Filterset
Sourcepub fn parse(
input: String,
cx: &ParseContext<'_>,
kind: FiltersetKind,
) -> Result<Self, FiltersetParseErrors>
pub fn parse( input: String, cx: &ParseContext<'_>, kind: FiltersetKind, ) -> Result<Self, FiltersetParseErrors>
Parse a filterset.
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.
Sourcepub fn needs_deps(raw_expr: &str) -> bool
pub fn needs_deps(raw_expr: &str) -> bool
Returns true if the given expression needs dependencies information to work
Trait Implementations§
impl Eq for Filterset
impl StructuralPartialEq for Filterset
Auto Trait Implementations§
impl Freeze for Filterset
impl RefUnwindSafe for Filterset
impl Send for Filterset
impl Sync for Filterset
impl Unpin for Filterset
impl UnwindSafe for Filterset
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
Converts
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>
Converts
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