Struct glob::MatchOptions [] [src]

pub struct MatchOptions {
    pub case_sensitive: bool,
    pub require_literal_separator: bool,
    pub require_literal_leading_dot: bool,
}

Configuration options to modify the behaviour of Pattern::matches_with(..)

Fields

case_sensitive

Whether or not patterns should be matched in a case-sensitive manner. This currently only considers upper/lower case relationships between ASCII characters, but in future this might be extended to work with Unicode.

require_literal_separator

If this is true then path-component separator characters (e.g. / on Posix) must be matched by a literal /, rather than by * or ? or [...]

require_literal_leading_dot

If this is true then paths that contain components that start with a . will not match unless the . appears literally in the pattern: *, ?, **, or [...] will not match. This is useful because such files are conventionally considered hidden on Unix systems and it might be desirable to skip them when listing files.

Methods

impl MatchOptions

fn new() -> MatchOptions

Constructs a new MatchOptions with default field values. This is used when calling functions that do not take an explicit MatchOptions parameter.

This function always returns this value:

MatchOptions {
    case_sensitive: true,
    require_literal_separator: false.
    require_literal_leading_dot: false
}

Trait Implementations

Derived Implementations

impl Default for MatchOptions

fn default() -> MatchOptions

impl Hash for MatchOptions

fn hash<__H: Hasher>(&self, __arg_0: &mut __H)

1.3.0fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher

impl Ord for MatchOptions

fn cmp(&self, __arg_0: &MatchOptions) -> Ordering

impl PartialOrd for MatchOptions

fn partial_cmp(&self, __arg_0: &MatchOptions) -> Option<Ordering>

fn lt(&self, __arg_0: &MatchOptions) -> bool

fn le(&self, __arg_0: &MatchOptions) -> bool

fn gt(&self, __arg_0: &MatchOptions) -> bool

fn ge(&self, __arg_0: &MatchOptions) -> bool

impl Eq for MatchOptions

impl PartialEq for MatchOptions

fn eq(&self, __arg_0: &MatchOptions) -> bool

fn ne(&self, __arg_0: &MatchOptions) -> bool

impl Clone for MatchOptions

fn clone(&self) -> MatchOptions

1.0.0fn clone_from(&mut self, source: &Self)