pub struct Directories {
pub extensions: Vec<String>,
pub include: Vec<AbsPathBuf>,
pub exclude: Vec<AbsPathBuf>,
}
Expand description
Specifies a set of files on the file system.
A file is included if:
- it has included extension
- it is under an
include
path - it is not under
exclude
path
If many include/exclude paths match, the longest one wins.
If a path is in both include
and exclude
, the exclude
one wins.
Fields§
§extensions: Vec<String>
§include: Vec<AbsPathBuf>
§exclude: Vec<AbsPathBuf>
Implementations§
Source§impl Directories
impl Directories
Sourcepub fn contains_file(&self, path: &AbsPath) -> bool
pub fn contains_file(&self, path: &AbsPath) -> bool
Returns true
if path
is included in self
.
Sourcepub fn contains_dir(&self, path: &AbsPath) -> bool
pub fn contains_dir(&self, path: &AbsPath) -> bool
Returns true
if path
is included in self
.
Since path
is supposed to be a directory, this will not take extension
into account.
Trait Implementations§
Source§impl Clone for Directories
impl Clone for Directories
Source§fn clone(&self) -> Directories
fn clone(&self) -> Directories
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Directories
impl Debug for Directories
Source§impl Default for Directories
impl Default for Directories
Source§fn default() -> Directories
fn default() -> Directories
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for Directories
impl RefUnwindSafe for Directories
impl Send for Directories
impl Sync for Directories
impl Unpin for Directories
impl UnwindSafe for Directories
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more