pub struct Options { /* private fields */ }
Expand description
Parser configuration, can be used to tune the regex parsing when
adding it to the Builder
. Every option defaults to false
whether through Default
or Options::new
.
The parser can also be configured via standard regex
inline
flags.
Implementations§
Source§impl Options
impl Options
Sourcepub fn case_insensitive(&mut self, yes: bool) -> &mut Self
pub fn case_insensitive(&mut self, yes: bool) -> &mut Self
Configures case-insensitive matching for the entire pattern.
Sourcepub fn dot_matches_new_line(&mut self, yes: bool) -> &mut Self
pub fn dot_matches_new_line(&mut self, yes: bool) -> &mut Self
Configures .
to match newline characters, by default .
matches everything except newline characters.
Sourcepub fn ignore_whitespace(&mut self, yes: bool) -> &mut Self
pub fn ignore_whitespace(&mut self, yes: bool) -> &mut Self
Configures ignoring whitespace inside patterns, as well as #
line comments (“verbose” mode).
Verbose mode is useful to break up complex regexes and improve their documentation.
Sourcepub fn multi_line(&mut self, yes: bool) -> &mut Self
pub fn multi_line(&mut self, yes: bool) -> &mut Self
Configures multi-line mode. When enabled, ^
matches at every
start of line and $
at every end of line, by default they
match only the start and end of the string respectively.ca
Sourcepub fn crlf(&mut self, yes: bool) -> &mut Self
pub fn crlf(&mut self, yes: bool) -> &mut Self
Allows \r
as a line terminator, by default only \n
is a
line terminator (relevant for Self::ignore_whitespace
and
Self::multi_line
).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Options
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnwindSafe for Options
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
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>
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>
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