pub struct FilePatterns {
pub base: PathBuf,
pub include: Option<PathOrPatternSet>,
pub exclude: PathOrPatternSet,
}
Fields§
§base: PathBuf
Default traversal base used when calling split_by_base()
without
any include
patterns.
include: Option<PathOrPatternSet>
§exclude: PathOrPatternSet
Implementations§
Source§impl FilePatterns
impl FilePatterns
pub fn new_with_base(base: PathBuf) -> Self
pub fn with_new_base(self, new_base: PathBuf) -> Self
pub fn matches_specifier(&self, specifier: &Url) -> bool
pub fn matches_specifier_detail(&self, specifier: &Url) -> FilePatternsMatch
pub fn matches_path(&self, path: &Path, path_kind: PathKind) -> bool
pub fn matches_path_detail( &self, path: &Path, path_kind: PathKind, ) -> FilePatternsMatch
Sourcepub fn split_by_base(&self) -> Vec<Self>
pub fn split_by_base(&self) -> Vec<Self>
Creates a collection of FilePatterns
where the containing patterns
are only the ones applicable to the base.
The order these are returned in is the order that the directory traversal should occur in.
Trait Implementations§
Source§impl Clone for FilePatterns
impl Clone for FilePatterns
Source§fn clone(&self) -> FilePatterns
fn clone(&self) -> FilePatterns
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 FilePatterns
impl Debug for FilePatterns
Source§impl Hash for FilePatterns
impl Hash for FilePatterns
Source§impl PartialEq for FilePatterns
impl PartialEq for FilePatterns
impl Eq for FilePatterns
impl StructuralPartialEq for FilePatterns
Auto Trait Implementations§
impl Freeze for FilePatterns
impl RefUnwindSafe for FilePatterns
impl Send for FilePatterns
impl Sync for FilePatterns
impl Unpin for FilePatterns
impl UnwindSafe for FilePatterns
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.