Enum ignore::Match [] [src]

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

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

The path didn't match any glob.

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

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

Methods

impl<T> Match<T>
[src]

[src]

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

[src]

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

[src]

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

[src]

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

[src]

Return the value inside this match if it exists.

[src]

Apply the given function to the value inside this match.

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

[src]

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

Trait Implementations

impl<T: Clone> Clone for Match<T>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<T: Debug> Debug for Match<T>
[src]

[src]

Formats the value using the given formatter.