pub struct ModuleGlobSetBuilder { /* private fields */ }Expand description
Builder for constructing a ModuleGlobSet.
For simple cases, prefer ModuleGlobSet::from_patterns instead.
Implementations§
Source§impl ModuleGlobSetBuilder
impl ModuleGlobSetBuilder
Sourcepub fn add(&mut self, pattern: &str) -> Result<&mut Self, ModuleGlobError>
pub fn add(&mut self, pattern: &str) -> Result<&mut Self, ModuleGlobError>
Adds a glob pattern to the builder.
Patterns starting with ! are treated as negated patterns.
§Errors
Returns an error if the pattern is invalid.
Sourcepub fn build(self) -> Result<ModuleGlobSet, ModuleGlobError>
pub fn build(self) -> Result<ModuleGlobSet, ModuleGlobError>
Builds the ModuleGlobSet from the added patterns.
§Errors
Returns an error if the regex set fails to compile.
Trait Implementations§
Source§impl Debug for ModuleGlobSetBuilder
impl Debug for ModuleGlobSetBuilder
Source§impl Default for ModuleGlobSetBuilder
impl Default for ModuleGlobSetBuilder
Source§fn default() -> ModuleGlobSetBuilder
fn default() -> ModuleGlobSetBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ModuleGlobSetBuilder
impl RefUnwindSafe for ModuleGlobSetBuilder
impl Send for ModuleGlobSetBuilder
impl Sync for ModuleGlobSetBuilder
impl Unpin for ModuleGlobSetBuilder
impl UnsafeUnpin for ModuleGlobSetBuilder
impl UnwindSafe for ModuleGlobSetBuilder
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