pub struct Glob { /* private fields */ }Expand description
A compiled --exclude-glob pattern.
Semantics: /-separated components; ** matches zero or more path
components; * / ? are wildcards inside one component. Matching is
case-insensitive (consistent with directory exclusion on Windows).
Star runs are collapsed at compile time (*** → **, a**b → a*b) —
semantically identical since consecutive stars match the same text.
Iterative matchers retry only the latest wildcard, giving polynomial
worst-case work without recursion or a budget that can discard matches.
Implementations§
Source§impl Glob
impl Glob
Sourcepub fn compile(pattern: &str) -> Result<Glob, String>
pub fn compile(pattern: &str) -> Result<Glob, String>
Compile pattern. Empty patterns are rejected. Backslashes are
normalized to / (convenient for Windows-style --exclude-glob).
Sourcepub fn compile_raw(pattern: &str) -> Result<Glob, String>
pub fn compile_raw(pattern: &str) -> Result<Glob, String>
Like Glob::compile, but a backslash is an ordinary literal character —
the ignore-file grammar deliberately has no escape support, so \
must not silently become / there.
Trait Implementations§
impl Eq for Glob
impl StructuralPartialEq for Glob
Auto Trait Implementations§
impl Forget for Glob
impl Freeze for Glob
impl Move for Glob
impl RefUnwindSafe for Glob
impl Send for Glob
impl Sync for Glob
impl Unpin for Glob
impl UnsafeUnpin for Glob
impl UnwindSafe for Glob
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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> ⓘ
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