#[non_exhaustive]pub enum PredicateClause {
Name {
pattern: NamePattern,
case: CaseSensitivity,
negated: bool,
},
NameInSet {
patterns: Vec<NamePattern>,
case: CaseSensitivity,
negated: bool,
},
IsType {
entry_type: EntryType,
negated: bool,
},
IsReparsePoint {
negated: bool,
},
ReparseTag {
tag: u32,
negated: bool,
},
AttributesAllSet(u32),
AttributesAllClear(u32),
LogicalSize {
operator: ComparisonOperator,
value: u64,
},
AllocationSize {
operator: ComparisonOperator,
value: u64,
},
Timestamp {
field: TimestampField,
operator: ComparisonOperator,
value: WindowsFileTimestamp,
},
}Expand description
One condition an entry must satisfy.
Clauses that can be sensibly inverted carry their own negated flag rather
than relying on an enclosing Not, which keeps the query flat and keeps the
negation adjacent to the thing it negates.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Name
The name matches a pattern.
Fields
pattern: NamePatternThe pattern to match the entry’s leaf name against.
case: CaseSensitivityHow the comparison treats case.
NameInSet
The name matches any pattern in a non-empty set.
Fields
patterns: Vec<NamePattern>The alternatives. Must not be empty.
case: CaseSensitivityHow the comparisons treat case.
IsType
The entry is (or, negated, is not) the given kind.
IsReparsePoint
The entry is (or, negated, is not) a reparse point.
ReparseTag
The entry is a reparse point whose tag equals tag.
A non-reparse entry has no tag, so it never satisfies this clause – and, negated, always does.
AttributesAllSet(u32)
Every bit in the mask is set in the entry’s attributes.
The mask must be non-zero.
AttributesAllClear(u32)
Every bit in the mask is clear in the entry’s attributes.
The mask must be non-zero.
LogicalSize
The entry’s logical size compares to value bytes.
AllocationSize
The entry’s allocation size compares to value bytes.
Timestamp
One of the entry’s four times compares to value.
Fields
field: TimestampFieldWhich time to read.
operator: ComparisonOperatorHow to compare.
value: WindowsFileTimestampThe timestamp to compare against.
Implementations§
Source§impl PredicateClause
impl PredicateClause
Sourcepub fn matches(&self, entry: &DirectoryEntry) -> bool
pub fn matches(&self, entry: &DirectoryEntry) -> bool
Whether entry satisfies this clause.
Trait Implementations§
Source§impl Clone for PredicateClause
impl Clone for PredicateClause
Source§fn clone(&self) -> PredicateClause
fn clone(&self) -> PredicateClause
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more