pub struct WorktreeIgnoreMatcher { /* private fields */ }Expand description
A compiled .heddleignore matcher. Compiling the glob set is the
expensive part; matching a single path against an already-built
matcher is cheap. Callers that test many paths against the same
patterns (e.g. counting unignored entries across a large diff)
should build the matcher once and reuse it, rather than paying the
per-path compile cost that the should_ignore convenience wrapper
incurs.
Implementations§
Source§impl WorktreeIgnoreMatcher
impl WorktreeIgnoreMatcher
Sourcepub fn is_ignored(&self, path: &Path) -> bool
pub fn is_ignored(&self, path: &Path) -> bool
Whether path is covered by any of the compiled patterns. See
should_ignore for the matching semantics (is_dir = true,
negation handling).
Auto Trait Implementations§
impl Freeze for WorktreeIgnoreMatcher
impl RefUnwindSafe for WorktreeIgnoreMatcher
impl Send for WorktreeIgnoreMatcher
impl Sync for WorktreeIgnoreMatcher
impl Unpin for WorktreeIgnoreMatcher
impl UnsafeUnpin for WorktreeIgnoreMatcher
impl UnwindSafe for WorktreeIgnoreMatcher
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