Struct globset::GlobBuilder [−][src]
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]
impl<'a> GlobBuilder<'a>
pub fn new(glob: &'a str) -> GlobBuilder<'a>
[src]
pub fn new(glob: &'a str) -> GlobBuilder<'a>
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]
pub fn build(&self) -> Result<Glob, Error>
Parses and builds the pattern.
pub fn case_insensitive(&mut self, yes: bool) -> &mut GlobBuilder<'a>
[src]
pub fn case_insensitive(&mut self, yes: bool) -> &mut GlobBuilder<'a>
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]
pub fn literal_separator(&mut self, yes: bool) -> &mut GlobBuilder<'a>
Toggle whether a literal /
is required to match a path separator.
pub fn backslash_escape(&mut self, yes: bool) -> &mut GlobBuilder<'a>
[src]
pub fn backslash_escape(&mut self, yes: bool) -> &mut GlobBuilder<'a>
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]
impl<'a> Clone for GlobBuilder<'a>
fn clone(&self) -> GlobBuilder<'a>
[src]
fn clone(&self) -> GlobBuilder<'a>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<'a> Debug for GlobBuilder<'a>
[src]
impl<'a> Debug for GlobBuilder<'a>
Auto Trait Implementations
impl<'a> Send for GlobBuilder<'a>
impl<'a> Send for GlobBuilder<'a>
impl<'a> Sync for GlobBuilder<'a>
impl<'a> Sync for GlobBuilder<'a>