pub struct PatternMatcher { /* private fields */ }Expand description
Pattern matcher for file inclusion/exclusion
Implementations§
Source§impl PatternMatcher
impl PatternMatcher
Sourcepub fn with_patterns(
ignore_patterns: &[String],
include_patterns: &[String],
) -> Result<Self>
pub fn with_patterns( ignore_patterns: &[String], include_patterns: &[String], ) -> Result<Self>
Build pattern matcher from ignore and include patterns
§Errors
Returns an error if patterns are invalid.
Sourcepub fn should_include(&self, path: &Path, is_dir: bool) -> bool
pub fn should_include(&self, path: &Path, is_dir: bool) -> bool
Check if a path should be included based on patterns
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PatternMatcher
impl RefUnwindSafe for PatternMatcher
impl Send for PatternMatcher
impl Sync for PatternMatcher
impl Unpin for PatternMatcher
impl UnwindSafe for PatternMatcher
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