Struct globset::Glob
[−]
[src]
pub struct Glob { /* fields omitted */ }Glob represents a successfully parsed shell glob pattern.
It cannot be used directly to match file paths, but it can be converted to a regular expression string or a matcher.
Methods
impl Glob[src]
pub fn new(glob: &str) -> Result<Glob, Error>[src]
Builds a new pattern with default options.
pub fn compile_matcher(&self) -> GlobMatcher[src]
Returns a matcher for this pattern.
pub fn glob(&self) -> &str[src]
Returns the original glob pattern used to build this pattern.
pub fn regex(&self) -> &str[src]
Returns the regular expression string for this glob.
Trait Implementations
impl Clone for Glob[src]
fn clone(&self) -> Glob[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl Debug for Glob[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl Eq for Glob[src]
impl PartialEq for Glob[src]
fn eq(&self, other: &Glob) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
This method tests for !=.
impl Hash for Glob[src]
fn hash<H: Hasher>(&self, state: &mut H)[src]
Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher]. Read more