pub struct FileFilter { /* private fields */ }Expand description
Filter configuration for scanning/watching.
Contains all filtering state in one place for deterministic behavior.
Implementations§
Source§impl FileFilter
impl FileFilter
Sourcepub fn new(
root: &Path,
include_patterns: &[String],
exclude_patterns: &[String],
) -> Result<Self>
pub fn new( root: &Path, include_patterns: &[String], exclude_patterns: &[String], ) -> Result<Self>
Sourcepub fn should_skip(&self, path: &Path) -> Option<SkipReason>
pub fn should_skip(&self, path: &Path) -> Option<SkipReason>
Sourcepub fn is_database_file(&self, path: &Path) -> bool
pub fn is_database_file(&self, path: &Path) -> bool
Check if a specific path is the database file itself.
This is a special case to avoid watching the database we’re writing to.
Auto Trait Implementations§
impl Freeze for FileFilter
impl RefUnwindSafe for FileFilter
impl Send for FileFilter
impl Sync for FileFilter
impl Unpin for FileFilter
impl UnsafeUnpin for FileFilter
impl UnwindSafe for FileFilter
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
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