Enum ignore::Match [−][src]
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.
Implementations
impl<T> Match<T>
[src]
pub fn is_none(&self) -> bool
[src]
Returns true if the match result didn’t match any globs.
pub fn is_ignore(&self) -> bool
[src]
Returns true if the match result implies the path should be ignored.
pub fn is_whitelist(&self) -> bool
[src]
Returns true if the match result implies the path should be whitelisted.
pub fn invert(self) -> Match<T>
[src]
Inverts the match so that Ignore
becomes Whitelist
and
Whitelist
becomes Ignore
. A non-match remains the same.
pub fn inner(&self) -> Option<&T>
[src]
Return the value inside this match if it exists.
pub 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.
pub fn or(self, other: Self) -> Self
[src]
Return the match if it is not none. Otherwise, return other.
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for Match<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Match<T> where
T: Send,
T: Send,
impl<T> Sync for Match<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Match<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Match<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,