Struct globset::GlobSet [−][src]
pub struct GlobSet { /* fields omitted */ }GlobSet represents a group of globs that can be matched together in a single pass.
Methods
impl GlobSet[src]
impl GlobSetpub fn empty() -> GlobSet[src]
pub fn empty() -> GlobSetCreate an empty GlobSet. An empty set matches nothing.
pub fn is_empty(&self) -> bool[src]
pub fn is_empty(&self) -> boolReturns true if this set is empty, and therefore matches nothing.
pub fn len(&self) -> usize[src]
pub fn len(&self) -> usizeReturns the number of globs in this set.
pub fn is_match<P: AsRef<Path>>(&self, path: P) -> bool[src]
pub fn is_match<P: AsRef<Path>>(&self, path: P) -> boolReturns true if any glob in this set matches the path given.
pub fn is_match_candidate(&self, path: &Candidate) -> bool[src]
pub fn is_match_candidate(&self, path: &Candidate) -> boolReturns 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]
pub fn matches<P: AsRef<Path>>(&self, path: P) -> Vec<usize>Returns the sequence number of every glob pattern that matches the given path.
pub fn matches_candidate(&self, path: &Candidate) -> Vec<usize>[src]
pub fn matches_candidate(&self, path: &Candidate) -> Vec<usize>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]
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 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]
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 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
impl Clone for GlobSet[src]
impl Clone for GlobSetfn clone(&self) -> GlobSet[src]
fn clone(&self) -> GlobSetReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Debug for GlobSet[src]
impl Debug for GlobSet