pub struct EngineFlags {
pub case_insensitive: bool,
pub multi_line: bool,
pub dot_matches_newline: bool,
pub unicode: bool,
pub extended: bool,
}Fields§
§case_insensitive: bool§multi_line: bool§dot_matches_newline: bool§unicode: bool§extended: boolImplementations§
Source§impl EngineFlags
impl EngineFlags
Sourcepub fn to_inline_prefix(&self) -> String
pub fn to_inline_prefix(&self) -> String
PHP-style positive flag set — each flag enabled is a single letter.
Used by the PHP codegen block where u enables unicode (opposite
convention from the regex crate, which has unicode on by default).
pub fn wrap_pattern(&self, pattern: &str) -> String
pub fn toggle_case_insensitive(&mut self)
pub fn toggle_multi_line(&mut self)
pub fn toggle_dot_matches_newline(&mut self)
pub fn toggle_unicode(&mut self)
pub fn toggle_extended(&mut self)
Trait Implementations§
Source§impl Clone for EngineFlags
impl Clone for EngineFlags
Source§fn clone(&self) -> EngineFlags
fn clone(&self) -> EngineFlags
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EngineFlags
impl Debug for EngineFlags
Source§impl Default for EngineFlags
impl Default for EngineFlags
Source§fn default() -> Self
fn default() -> Self
Unicode defaults to true to match the regex crate and
fancy-regex engine behavior and the runtime Settings default.
Using #[derive(Default)] would produce unicode: false, which
(combined with to_regex_inline_prefix emitting (?-u) for
byte-mode) would cause fancy-regex to reject the pattern with
“Disabling Unicode not supported”.
impl Copy for EngineFlags
Auto Trait Implementations§
impl Freeze for EngineFlags
impl RefUnwindSafe for EngineFlags
impl Send for EngineFlags
impl Sync for EngineFlags
impl Unpin for EngineFlags
impl UnsafeUnpin for EngineFlags
impl UnwindSafe for EngineFlags
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§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