Struct globset::GlobSetBuilder
source · [−]pub struct GlobSetBuilder { /* private fields */ }
Expand description
GlobSetBuilder builds a group of patterns that can be used to simultaneously match a file path.
Implementations
sourceimpl GlobSetBuilder
impl GlobSetBuilder
sourcepub fn new() -> GlobSetBuilder
pub fn new() -> GlobSetBuilder
Create a new GlobSetBuilder. A GlobSetBuilder can be used to add new
patterns. Once all patterns have been added, build
should be called
to produce a GlobSet
, which can then be used for matching.
sourcepub fn build(&self) -> Result<GlobSet, Error>
pub fn build(&self) -> Result<GlobSet, Error>
Builds a new matcher from all of the glob patterns added so far.
Once a matcher is built, no new patterns can be added to it.
sourcepub fn add(&mut self, pat: Glob) -> &mut GlobSetBuilder
pub fn add(&mut self, pat: Glob) -> &mut GlobSetBuilder
Add a new pattern to this set.
Trait Implementations
sourceimpl Clone for GlobSetBuilder
impl Clone for GlobSetBuilder
sourcefn clone(&self) -> GlobSetBuilder
fn clone(&self) -> GlobSetBuilder
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl RefUnwindSafe for GlobSetBuilder
impl Send for GlobSetBuilder
impl Sync for GlobSetBuilder
impl Unpin for GlobSetBuilder
impl UnwindSafe for GlobSetBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more