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]

Builds a new pattern with default options.

Returns a matcher for this pattern.

Returns the original glob pattern used to build this pattern.

Returns the regular expression string for this glob.

Note that regular expressions for globs are intended to be matched on arbitrary bytes (&[u8]) instead of Unicode strings (&str). In particular, globs are frequently used on file paths, where there is no general guarantee that file paths are themselves valid UTF-8. As a result, callers will need to ensure that they are using a regex API that can match on arbitrary bytes. For example, the regex crate's Regex API is not suitable for this since it matches on &str, but its bytes::Regex API is suitable for this.

Trait Implementations

impl Clone for Glob
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Glob
[src]

Formats the value using the given formatter. Read more

impl Eq for Glob
[src]

impl PartialEq for Glob
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Hash for Glob
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl Display for Glob
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for Glob

impl Sync for Glob