pub struct Flags {
pub ignore_case: Option<bool>,
pub multiline: bool,
pub dotall: bool,
pub verbose: bool,
pub unicode: bool,
pub global: bool,
}Expand description
Configuration flags that modify the behavior of the regular expression engine.
Fields§
§ignore_case: Option<bool>Controls case sensitivity.
None: Smartcase (case-insensitive if pattern is all lowercase, sensitive otherwise).Some(true): Case-insensitive (iflag).Some(false): Case-sensitive (cflag).
multiline: boolIf true, ^ and $ match line boundaries (\n) instead of just the start/end of the text (m flag).
dotall: boolIf true, . matches newlines (s flag).
verbose: boolIf true, whitespace and comments in the pattern are ignored (x flag).
unicode: boolIf true, enables Unicode support for character classes (u flag).
global: boolIf true, indicates that the regex should match all occurrences (g flag).
Note: This flag is often handled by the caller (e.g., find_all vs find), but is preserved here for parsing.
Trait Implementations§
impl Copy for Flags
Auto Trait Implementations§
impl Freeze for Flags
impl RefUnwindSafe for Flags
impl Send for Flags
impl Sync for Flags
impl Unpin for Flags
impl UnwindSafe for Flags
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