pub struct IgnoreFilter(/* private fields */);Expand description
The ignore filter of a watcher, see Config::with_ignored.
The default filter ignores nothing. Clones share the same filter function.
Implementations§
Source§impl IgnoreFilter
impl IgnoreFilter
Sourcepub fn new(
ignored: impl Fn(&Path, EntryKind) -> bool + Send + Sync + 'static,
) -> Self
pub fn new( ignored: impl Fn(&Path, EntryKind) -> bool + Send + Sync + 'static, ) -> Self
Creates a filter that ignores the paths for which ignored returns true.
Sourcepub fn is_ignored(&self, path: &Path, kind: EntryKind) -> bool
pub fn is_ignored(&self, path: &Path, kind: EntryKind) -> bool
Returns whether the filter ignores path.
Sourcepub fn is_path_ignored(&self, path: &Path) -> bool
pub fn is_path_ignored(&self, path: &Path) -> bool
Like IgnoreFilter::is_ignored, but looks up the kind of path in the file system.
Trait Implementations§
Source§impl Clone for IgnoreFilter
impl Clone for IgnoreFilter
Source§impl Debug for IgnoreFilter
impl Debug for IgnoreFilter
Auto Trait Implementations§
impl !RefUnwindSafe for IgnoreFilter
impl !UnwindSafe for IgnoreFilter
impl Freeze for IgnoreFilter
impl Send for IgnoreFilter
impl Sync for IgnoreFilter
impl Unpin for IgnoreFilter
impl UnsafeUnpin for IgnoreFilter
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