Struct watchexec::ignore::IgnoreFilterer
source · [−]pub struct IgnoreFilterer { /* private fields */ }
Expand description
A path-only filterer dedicated to ignore files.
This reads and compiles ignore files, and should be used for handling ignore files. It’s created
with a project origin and a list of ignore files, and new ignore files can be added later
(unless finish
is called).
It implements Filterer
so it can be used directly in another filterer; it is not designed to
be used as a standalone filterer.
Implementations
Create a new empty filterer.
Prefer new()
if you have ignore files ready to use.
pub async fn new(
origin: impl AsRef<Path>,
files: &[IgnoreFile]
) -> Result<Self, RuntimeError>
pub async fn new(
origin: impl AsRef<Path>,
files: &[IgnoreFile]
) -> Result<Self, RuntimeError>
Read ignore files from disk and load them for filtering.
Use empty()
if you want an empty filterer,
or to construct one outside an async environment.
Deletes the internal builder, to save memory.
This makes it impossible to add new ignore files without re-compiling the whole set.
Reads and adds an ignore file, if the builder is available.
Does nothing silently otherwise.
Adds some globs manually, if the builder is available.
Does nothing silently otherwise.
Trait Implementations
Filter an event.
This implementation never errors. It returns Ok(false)
if the event is ignored according
to the ignore files, and Ok(true)
otherwise.
Auto Trait Implementations
impl RefUnwindSafe for IgnoreFilterer
impl Send for IgnoreFilterer
impl Sync for IgnoreFilterer
impl Unpin for IgnoreFilterer
impl UnwindSafe for IgnoreFilterer
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more