[][src]Struct globset::GlobBuilder

pub struct GlobBuilder<'a> { /* fields omitted */ }

A builder for a pattern.

This builder enables configuring the match semantics of a pattern. For example, one can make matching case insensitive.

The lifetime 'a refers to the lifetime of the pattern string.

Methods

impl<'a> GlobBuilder<'a>[src]

pub fn new(glob: &'a str) -> GlobBuilder<'a>[src]

Create a new builder for the pattern given.

The pattern is not compiled until build is called.

pub fn build(&self) -> Result<Glob, Error>[src]

Parses and builds the pattern.

pub fn case_insensitive(&mut self, yes: bool) -> &mut GlobBuilder<'a>[src]

Toggle whether the pattern matches case insensitively or not.

This is disabled by default.

pub fn literal_separator(&mut self, yes: bool) -> &mut GlobBuilder<'a>[src]

Toggle whether a literal / is required to match a path separator.

pub fn backslash_escape(&mut self, yes: bool) -> &mut GlobBuilder<'a>[src]

When enabled, a back slash () may be used to escape special characters in a glob pattern. Additionally, this will prevent from being interpreted as a path separator on all platforms.

This is enabled by default on platforms where is not a path separator and disabled by default on platforms where is a path separator.

Trait Implementations

impl<'a> Clone for GlobBuilder<'a>[src]

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

Performs copy-assignment from source. Read more

impl<'a> Debug for GlobBuilder<'a>[src]

Auto Trait Implementations

impl<'a> Send for GlobBuilder<'a>

impl<'a> Unpin for GlobBuilder<'a>

impl<'a> Sync for GlobBuilder<'a>

impl<'a> UnwindSafe for GlobBuilder<'a>

impl<'a> RefUnwindSafe for GlobBuilder<'a>

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

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

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

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