[][src]Struct glob::MatchOptions

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: bool

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: bool

Whether or not path-component separator characters (e.g. / on Posix) must be matched by a literal /, rather than by * or ? or [...].

require_literal_leading_dot: bool

Whether or not paths that contain components that start with a . will require that . 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[src]

pub fn new() -> Self[src]

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:

This example is not tested
MatchOptions {
    case_sensitive: true,
    require_literal_separator: false,
    require_literal_leading_dot: false
}

Trait Implementations

impl Clone for MatchOptions[src]

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

Performs copy-assignment from source. Read more

impl PartialEq<MatchOptions> for MatchOptions[src]

impl PartialOrd<MatchOptions> for MatchOptions[src]

impl Eq for MatchOptions[src]

impl Ord for MatchOptions[src]

fn max(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl Copy for MatchOptions[src]

impl Default for MatchOptions[src]

impl Hash for MatchOptions[src]

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

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

Auto Trait Implementations

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.