pub struct PatternBuilder { /* private fields */ }Expand description
Pattern matching builder for fluent API construction
Implementations§
Source§impl PatternBuilder
impl PatternBuilder
Sourcepub fn new() -> PatternBuilder
pub fn new() -> PatternBuilder
Create a new pattern builder
Sourcepub fn include<S>(self, pattern: S) -> PatternBuilder
pub fn include<S>(self, pattern: S) -> PatternBuilder
Add an include pattern
Sourcepub fn includes<I, S>(self, patterns: I) -> PatternBuilder
pub fn includes<I, S>(self, patterns: I) -> PatternBuilder
Add multiple include patterns
Sourcepub fn exclude<S>(self, pattern: S) -> PatternBuilder
pub fn exclude<S>(self, pattern: S) -> PatternBuilder
Add an exclude pattern
Sourcepub fn excludes<I, S>(self, patterns: I) -> PatternBuilder
pub fn excludes<I, S>(self, patterns: I) -> PatternBuilder
Add multiple exclude patterns
Sourcepub fn gitignore<P>(self, path: P) -> PatternBuilder
pub fn gitignore<P>(self, path: P) -> PatternBuilder
Add a gitignore file
Sourcepub fn case_sensitive(self, enabled: bool) -> PatternBuilder
pub fn case_sensitive(self, enabled: bool) -> PatternBuilder
Set case sensitivity
Sourcepub fn build(self) -> Result<PatternMatcher, ScribeError>
pub fn build(self) -> Result<PatternMatcher, ScribeError>
Build the pattern matcher
Trait Implementations§
Source§impl Default for PatternBuilder
impl Default for PatternBuilder
Source§fn default() -> PatternBuilder
fn default() -> PatternBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PatternBuilder
impl RefUnwindSafe for PatternBuilder
impl Send for PatternBuilder
impl Sync for PatternBuilder
impl Unpin for PatternBuilder
impl UnwindSafe for PatternBuilder
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