Enum ignore::Match[][src]

pub enum Match<T> {
    None,
    Ignore(T),
    Whitelist(T),
}
Expand description

The result of a glob match.

The type parameter T typically refers to a type that provides more information about a particular match. For example, it might identify the specific gitignore file and the specific glob pattern that caused the match.

Variants

None

The path didn’t match any glob.

Ignore(T)

The highest precedent glob matched indicates the path should be ignored.

Whitelist(T)

The highest precedent glob matched indicates the path should be whitelisted.

Implementations

Returns true if the match result didn’t match any globs.

Returns true if the match result implies the path should be ignored.

Returns true if the match result implies the path should be whitelisted.

Inverts the match so that Ignore becomes Whitelist and Whitelist becomes Ignore. A non-match remains the same.

Return the value inside this match if it exists.

Apply the given function to the value inside this match.

If the match has no value, then return the match unchanged.

Return the match if it is not none. Otherwise, return other.

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.