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
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.
Methods
impl<T> Match<T>
[src]
fn is_none(&self) -> bool
[src]
Returns true if the match result didn't match any globs.
fn is_ignore(&self) -> bool
[src]
Returns true if the match result implies the path should be ignored.
fn is_whitelist(&self) -> bool
[src]
Returns true if the match result implies the path should be whitelisted.
fn invert(self) -> Match<T>
[src]
Inverts the match so that Ignore
becomes Whitelist
and
Whitelist
becomes Ignore
. A non-match remains the same.
fn inner(&self) -> Option<&T>
[src]
Return the value inside this match if it exists.
fn map<U, F: FnOnce(T) -> U>(self, f: F) -> Match<U>
[src]
Apply the given function to the value inside this match.
If the match has no value, then return the match unchanged.
fn or(self, other: Self) -> Self
[src]
Return the match if it is not none. Otherwise, return other.
Trait Implementations
impl<T: Clone> Clone for Match<T>
[src]
fn clone(&self) -> Match<T>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more