Struct globset::GlobBuilder [−][src]
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.
Implementations
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(&self) -> GlobBuilder<'a>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Debug for GlobBuilder<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for GlobBuilder<'a>
impl<'a> Send for GlobBuilder<'a>
impl<'a> Sync for GlobBuilder<'a>
impl<'a> Unpin for GlobBuilder<'a>
impl<'a> UnwindSafe for GlobBuilder<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,