struct Builder {
pats: Vec<String>,
metac: Config,
syntaxc: Config,
}
Expand description
A builder for constructing a Regex
, bytes::Regex
, RegexSet
or a
bytes::RegexSet
.
This is essentially the implementation of the four different builder types
in the public API: RegexBuilder
, bytes::RegexBuilder
, RegexSetBuilder
and bytes::RegexSetBuilder
.
Fields§
§pats: Vec<String>
§metac: Config
§syntaxc: Config
Implementations§
source§impl Builder
impl Builder
fn new<I, S>(patterns: I) -> Builder
fn build_one_string(&self) -> Result<Regex, Error>
fn build_one_bytes(&self) -> Result<Regex, Error>
fn build_many_string(&self) -> Result<RegexSet, Error>
fn build_many_bytes(&self) -> Result<RegexSet, Error>
fn case_insensitive(&mut self, yes: bool) -> &mut Builder
fn multi_line(&mut self, yes: bool) -> &mut Builder
fn dot_matches_new_line(&mut self, yes: bool) -> &mut Builder
fn crlf(&mut self, yes: bool) -> &mut Builder
fn line_terminator(&mut self, byte: u8) -> &mut Builder
fn swap_greed(&mut self, yes: bool) -> &mut Builder
fn ignore_whitespace(&mut self, yes: bool) -> &mut Builder
fn unicode(&mut self, yes: bool) -> &mut Builder
fn octal(&mut self, yes: bool) -> &mut Builder
fn size_limit(&mut self, limit: usize) -> &mut Builder
fn dfa_size_limit(&mut self, limit: usize) -> &mut Builder
fn nest_limit(&mut self, limit: u32) -> &mut Builder
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Builder
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)