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
Returns true if the match result didn't match any globs.
fn is_ignore(&self) -> bool
Returns true if the match result implies the path should be ignored.
fn is_whitelist(&self) -> bool
Returns true if the match result implies the path should be whitelisted.
fn invert(self) -> Match<T>
Inverts the match so that Ignore
becomes Whitelist
and
Whitelist
becomes Ignore
. A non-match remains the same.
fn inner(&self) -> Option<&T>
Return the value inside this match if it exists.
fn map<U, F: FnOnce(T) -> U>(self, f: F) -> Match<U>
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
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>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more