pub struct PatternMatcherBuilder { /* private fields */ }Expand description
Builder for creating pattern matchers with a fluent API
Implementations§
Source§impl PatternMatcherBuilder
impl PatternMatcherBuilder
Sourcepub fn new() -> PatternMatcherBuilder
pub fn new() -> PatternMatcherBuilder
Create a new builder
Sourcepub fn includes<I, S>(self, patterns: I) -> PatternMatcherBuilder
pub fn includes<I, S>(self, patterns: I) -> PatternMatcherBuilder
Add include patterns
Sourcepub fn include<S>(self, pattern: S) -> PatternMatcherBuilder
pub fn include<S>(self, pattern: S) -> PatternMatcherBuilder
Add a single include pattern
Sourcepub fn excludes<I, S>(self, patterns: I) -> PatternMatcherBuilder
pub fn excludes<I, S>(self, patterns: I) -> PatternMatcherBuilder
Add exclude patterns
Sourcepub fn exclude<S>(self, pattern: S) -> PatternMatcherBuilder
pub fn exclude<S>(self, pattern: S) -> PatternMatcherBuilder
Add a single exclude pattern
Sourcepub fn respect_gitignore(self, respect: bool) -> PatternMatcherBuilder
pub fn respect_gitignore(self, respect: bool) -> PatternMatcherBuilder
Set whether to respect gitignore files
Sourcepub fn case_sensitive(self, sensitive: bool) -> PatternMatcherBuilder
pub fn case_sensitive(self, sensitive: bool) -> PatternMatcherBuilder
Set case sensitivity
Set whether to include hidden files
Sourcepub fn custom_gitignore_files<I, P>(self, files: I) -> PatternMatcherBuilder
pub fn custom_gitignore_files<I, P>(self, files: I) -> PatternMatcherBuilder
Add custom gitignore files
Sourcepub fn override_patterns<I, S>(self, patterns: I) -> PatternMatcherBuilder
pub fn override_patterns<I, S>(self, patterns: I) -> PatternMatcherBuilder
Add override patterns
Sourcepub fn base_path<P>(self, path: P) -> PatternMatcherBuilder
pub fn base_path<P>(self, path: P) -> PatternMatcherBuilder
Set the base path for gitignore resolution
Sourcepub fn build(self) -> Result<PatternMatcher, Error>
pub fn build(self) -> Result<PatternMatcher, Error>
Build the pattern matcher
Trait Implementations§
Source§impl Debug for PatternMatcherBuilder
impl Debug for PatternMatcherBuilder
Source§impl Default for PatternMatcherBuilder
impl Default for PatternMatcherBuilder
Source§fn default() -> PatternMatcherBuilder
fn default() -> PatternMatcherBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PatternMatcherBuilder
impl RefUnwindSafe for PatternMatcherBuilder
impl Send for PatternMatcherBuilder
impl Sync for PatternMatcherBuilder
impl Unpin for PatternMatcherBuilder
impl UnwindSafe for PatternMatcherBuilder
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more