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
sourceimpl<T> Match<T>
impl<T> Match<T>
sourcepub fn is_ignore(&self) -> bool
pub fn is_ignore(&self) -> bool
Returns true if the match result implies the path should be ignored.
sourcepub fn is_whitelist(&self) -> bool
pub fn is_whitelist(&self) -> bool
Returns true if the match result implies the path should be whitelisted.
sourcepub fn invert(self) -> Match<T>
pub fn invert(self) -> Match<T>
Inverts the match so that Ignore
becomes Whitelist
and
Whitelist
becomes Ignore
. A non-match remains the same.
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for Match<T> where
T: RefUnwindSafe,
impl<T> Send for Match<T> where
T: Send,
impl<T> Sync for Match<T> where
T: Sync,
impl<T> Unpin for Match<T> where
T: Unpin,
impl<T> UnwindSafe for Match<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more