Struct ignore::overrides::Override[][src]

pub struct Override(_);
Expand description

Manages a set of overrides provided explicitly by the end user.

Implementations

Returns an empty matcher that never matches any file path.

Returns the directory of this override set.

All matches are done relative to this path.

Returns true if and only if this matcher is empty.

When a matcher is empty, it will never match any file path.

Returns the total number of ignore globs.

Returns the total number of whitelisted globs.

Returns whether the given file path matched a pattern in this override matcher.

is_dir should be true if the path refers to a directory and false otherwise.

If there are no overrides, then this always returns Match::None.

If there is at least one whitelist override and is_dir is false, then this never returns Match::None, since non-matches are interpreted as ignored.

The given path is matched to the globs relative to the path given when building the override matcher. Specifically, before matching path, its prefix (as determined by a common suffix of the directory given) is stripped. If there is no common suffix/prefix overlap, then path is assumed to reside in the same directory as the root path for this set of overrides.

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

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.

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)

recently added

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.