pub enum IgnoredEntries {
Include,
Exclude,
Only,
}Expand description
Which entries a query considers by their .gitignore classification.
Selection rather than scope, like every other filter: the scan classifies every entry
and the index keeps both partitions, so choosing one never costs a rescan. An ignored
directory’s descendants are all ignored, so rejecting entries one at a time prunes
exactly the subtrees git would.
Variants§
Include
Every entry, ignored or not. Rows carry their ignored share.
Exclude
Only entries no .gitignore rule ignores.
Only
Only entries a .gitignore rule ignores.
Implementations§
Source§impl IgnoredEntries
impl IgnoredEntries
Sourcepub const fn admits(self, ignored: bool) -> bool
pub const fn admits(self, ignored: bool) -> bool
Whether an entry with this classification passes.
Sourcepub fn parse(value: &str) -> Result<Self, String>
pub fn parse(value: &str) -> Result<Self, String>
Parse the library’s spelling: include, exclude, or only.
The expectation only, as crate::query::ViewSpec::parse returns it, so each
surface names its own knob in front of it.
Sourcepub const fn label(self) -> &'static str
pub const fn label(self) -> &'static str
Stable label, the inverse of Self::parse.