pub struct GlobSet { /* private fields */ }
Expand description
GlobSet represents a group of globs that can be matched together in a single pass.
Implementations
sourceimpl GlobSet
impl GlobSet
sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns true if this set is empty, and therefore matches nothing.
sourcepub fn is_match<P: AsRef<Path>>(&self, path: P) -> bool
pub fn is_match<P: AsRef<Path>>(&self, path: P) -> bool
Returns true if any glob in this set matches the path given.
sourcepub fn is_match_candidate(&self, path: &Candidate<'_>) -> bool
pub fn is_match_candidate(&self, path: &Candidate<'_>) -> bool
Returns true if any glob in this set matches the path given.
This takes a Candidate as input, which can be used to amortize the cost of preparing a path for matching.
sourcepub fn matches<P: AsRef<Path>>(&self, path: P) -> Vec<usize>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn matches<P: AsRef<Path>>(&self, path: P) -> Vec<usize>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Returns the sequence number of every glob pattern that matches the given path.
sourcepub fn matches_candidate(&self, path: &Candidate<'_>) -> Vec<usize>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn matches_candidate(&self, path: &Candidate<'_>) -> Vec<usize>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Returns the sequence number of every glob pattern that matches the given path.
This takes a Candidate as input, which can be used to amortize the cost of preparing a path for matching.
sourcepub fn matches_into<P: AsRef<Path>>(&self, path: P, into: &mut Vec<usize>)
pub fn matches_into<P: AsRef<Path>>(&self, path: P, into: &mut Vec<usize>)
Adds the sequence number of every glob pattern that matches the given path to the vec given.
into
is cleared before matching begins, and contains the set of
sequence numbers (in ascending order) after matching ends. If no globs
were matched, then into
will be empty.
sourcepub fn matches_candidate_into(
&self,
path: &Candidate<'_>,
into: &mut Vec<usize>
)
pub fn matches_candidate_into(
&self,
path: &Candidate<'_>,
into: &mut Vec<usize>
)
Adds the sequence number of every glob pattern that matches the given path to the vec given.
into
is cleared before matching begins, and contains the set of
sequence numbers (in ascending order) after matching ends. If no globs
were matched, then into
will be empty.
This takes a Candidate as input, which can be used to amortize the cost of preparing a path for matching.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for GlobSet
impl Send for GlobSet
impl Sync for GlobSet
impl Unpin for GlobSet
impl UnwindSafe for GlobSet
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub 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.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more