pub struct PathGlobSet {
pub patterns: Vec<String>,
/* private fields */
}Expand description
Compiled set of path globs (gitignore-style ** via globset).
§Semantics
Patterns are compiled with literal path separators (GlobBuilder::literal_separator(true)):
*and?match within a single path segment only**matches across directories (including zero segments)- character classes (
[abc]) work as in globset/gitignore
Empty pattern list matches everything (no filter).
§Match candidates
A file matches if any pattern matches any applicable candidate (OR/OR):
- Relative path — path of
filerelative toscan_root, POSIX/separators (always tried). - Basename — file name only, tried when the set contains at least one pattern
with no
/(e.g.crawlplan.parquet), so bare filenames match at any depth. - Absolute path — full path with
/separators, tried when the set contains at least one pattern starting with/.
Path-shaped patterns (*/…, **/…) never fall back to basename-only matching in a
way that would let a shallow * over-match deep trees — * cannot cross /.
Fields§
§patterns: Vec<String>Original patterns (for diagnostics).
Implementations§
Trait Implementations§
Source§impl Clone for PathGlobSet
impl Clone for PathGlobSet
Source§fn clone(&self) -> PathGlobSet
fn clone(&self) -> PathGlobSet
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PathGlobSet
impl RefUnwindSafe for PathGlobSet
impl Send for PathGlobSet
impl Sync for PathGlobSet
impl Unpin for PathGlobSet
impl UnsafeUnpin for PathGlobSet
impl UnwindSafe for PathGlobSet
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for T
impl<T> Downcast for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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