[−][src]Struct globset::GlobSet
GlobSet represents a group of globs that can be matched together in a single pass.
Methods
impl GlobSet
[src]
pub fn empty() -> GlobSet
[src]
Create an empty GlobSet
. An empty set matches nothing.
pub fn is_empty(&self) -> bool
[src]
Returns true if this set is empty, and therefore matches nothing.
pub fn len(&self) -> usize
[src]
Returns the number of globs in this set.
pub fn is_match<P: AsRef<Path>>(&self, path: P) -> bool
[src]
Returns true if any glob in this set matches the path given.
pub fn is_match_candidate(&self, path: &Candidate) -> bool
[src]
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.
pub fn matches<P: AsRef<Path>>(&self, path: P) -> Vec<usize>
[src]
Returns the sequence number of every glob pattern that matches the given path.
pub fn matches_candidate(&self, path: &Candidate) -> Vec<usize>
[src]
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.
pub fn matches_into<P: AsRef<Path>>(&self, path: P, into: &mut Vec<usize>)
[src]
Adds the sequence number of every glob pattern that matches the given path to the vec given.
into
is 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.
pub fn matches_candidate_into(&self, path: &Candidate, into: &mut Vec<usize>)
[src]
Adds the sequence number of every glob pattern that matches the given path to the vec given.
into
is 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
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,
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.
fn to_owned(&self) -> T
[src]
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.
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>,