pub struct RegexBuilder { /* private fields */ }Expand description
A builder for a Regex with readable options — the mirror of regex::RegexBuilder.
Implementations§
Source§impl RegexBuilder
impl RegexBuilder
Sourcepub fn new(pattern: &str) -> RegexBuilder
pub fn new(pattern: &str) -> RegexBuilder
Start building from pattern.
Sourcepub fn case_insensitive(&mut self, yes: bool) -> &mut RegexBuilder
pub fn case_insensitive(&mut self, yes: bool) -> &mut RegexBuilder
Case-insensitive matching (ASCII; REAL’s icase). Maps to (?i).
Sourcepub fn multi_line(&mut self, yes: bool) -> &mut RegexBuilder
pub fn multi_line(&mut self, yes: bool) -> &mut RegexBuilder
^/$ match at line boundaries. Maps to (?m).
Sourcepub fn dot_matches_new_line(&mut self, yes: bool) -> &mut RegexBuilder
pub fn dot_matches_new_line(&mut self, yes: bool) -> &mut RegexBuilder
. matches newlines. Maps to (?s).
Sourcepub fn ignore_whitespace(&mut self, yes: bool) -> &mut RegexBuilder
pub fn ignore_whitespace(&mut self, yes: bool) -> &mut RegexBuilder
Verbose mode — insignificant whitespace and # comments. Maps to (?x).
Sourcepub fn unicode(&mut self, yes: bool) -> &mut RegexBuilder
pub fn unicode(&mut self, yes: bool) -> &mut RegexBuilder
Unicode mode. true (the default) keeps REAL’s Unicode str semantics; false restricts \w \d \s \b
and case folding to ASCII (REAL’s ascii flag), mirroring regex’s unicode(false).
Sourcepub fn size_limit(&mut self, _bytes: usize) -> &mut RegexBuilder
pub fn size_limit(&mut self, _bytes: usize) -> &mut RegexBuilder
Accepted for API compatibility with regex; REAL enforces its own fixed complexity caps, so this is a
no-op (there is no per-pattern memory budget to set).
Auto Trait Implementations§
impl Freeze for RegexBuilder
impl RefUnwindSafe for RegexBuilder
impl Send for RegexBuilder
impl Sync for RegexBuilder
impl Unpin for RegexBuilder
impl UnsafeUnpin for RegexBuilder
impl UnwindSafe for RegexBuilder
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