Struct ignore::overrides::Override [−][src]
Manages a set of overrides provided explicitly by the end user.
Implementations
impl Override
[src]
pub fn empty() -> Override
[src]
Returns an empty matcher that never matches any file path.
pub fn path(&self) -> &Path
[src]
Returns the directory of this override set.
All matches are done relative to this path.
pub fn is_empty(&self) -> bool
[src]
Returns true if and only if this matcher is empty.
When a matcher is empty, it will never match any file path.
pub fn num_ignores(&self) -> u64
[src]
Returns the total number of ignore globs.
pub fn num_whitelists(&self) -> u64
[src]
Returns the total number of whitelisted globs.
pub fn matched<'a, P: AsRef<Path>>(
&'a self,
path: P,
is_dir: bool
) -> Match<Glob<'a>>
[src]
&'a self,
path: P,
is_dir: bool
) -> Match<Glob<'a>>
Returns whether the given file path matched a pattern in this override matcher.
is_dir
should be true if the path refers to a directory and false
otherwise.
If there are no overrides, then this always returns Match::None
.
If there is at least one whitelist override and is_dir
is false, then
this never returns Match::None
, since non-matches are interpreted as
ignored.
The given path is matched to the globs relative to the path given
when building the override matcher. Specifically, before matching
path
, its prefix (as determined by a common suffix of the directory
given) is stripped. If there is no common suffix/prefix overlap, then
path
is assumed to reside in the same directory as the root path for
this set of overrides.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Override
impl Send for Override
impl Sync for Override
impl Unpin for Override
impl UnwindSafe for Override
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>,