logo
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.

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.

Returns the number of ignores and allowlists loaded.

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.

Check a particular folder path against the ignore set.

Returns false if the folder should be ignored.

Note that this is a slightly different implementation than the Filterer trait, as the latter handles events with multiple associated paths.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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