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§
source§impl 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§
source§impl Clone for GlobSetBuilder
impl Clone for GlobSetBuilder
source§fn clone(&self) -> GlobSetBuilder
fn clone(&self) -> GlobSetBuilder
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl RefUnwindSafe for GlobSetBuilder
impl Send for GlobSetBuilder
impl Sync for GlobSetBuilder
impl Unpin for GlobSetBuilder
impl UnwindSafe for GlobSetBuilder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more