pub struct MatchFlags {
pub best_match: bool,
pub enhance_match: bool,
pub posix: bool,
pub verbose: bool,
pub dot_all: bool,
pub multi_line: bool,
pub ungreedy: bool,
pub case_insensitive: bool,
pub global: bool,
pub unicode: bool,
}Expand description
Matching flags that can be set in the pattern.
Fields§
§best_match: boolBESTMATCH flag ((?b)) - search for the best match instead of the first.
enhance_match: boolENHANCEMATCH flag ((?e)) - improve the fit of fuzzy matches.
posix: boolPOSIX leftmost-longest flag ((?p)) - find longest match at leftmost position.
verbose: boolVerbose flag ((?x)) - ignore whitespace and allow comments.
dot_all: boolDot-all flag ((?s)) - . matches newlines.
multi_line: boolMulti-line flag ((?m)) - ^/$ match at line boundaries.
ungreedy: boolUngreedy flag ((?U)) - invert default greediness of quantifiers.
case_insensitive: boolCase-insensitive flag ((?i)) - match case-insensitively.
global: boolGlobal flag ((?g)) - find all matches, not just the first.
unicode: boolUnicode flag ((?u)) - enable Unicode character classes.
Implementations§
Source§impl MatchFlags
impl MatchFlags
Sourcepub fn with_best_match(self) -> Self
pub fn with_best_match(self) -> Self
Set the BESTMATCH flag.
Sourcepub fn with_enhance_match(self) -> Self
pub fn with_enhance_match(self) -> Self
Set the ENHANCEMATCH flag.
Sourcepub fn with_posix(self) -> Self
pub fn with_posix(self) -> Self
Set the POSIX flag.
Trait Implementations§
Source§impl Clone for MatchFlags
impl Clone for MatchFlags
Source§fn clone(&self) -> MatchFlags
fn clone(&self) -> MatchFlags
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 MatchFlags
impl Debug for MatchFlags
Source§impl Default for MatchFlags
impl Default for MatchFlags
Source§fn default() -> MatchFlags
fn default() -> MatchFlags
Returns the “default value” for a type. Read more
Source§impl PartialEq for MatchFlags
impl PartialEq for MatchFlags
impl Copy for MatchFlags
impl Eq for MatchFlags
impl StructuralPartialEq for MatchFlags
Auto Trait Implementations§
impl Freeze for MatchFlags
impl RefUnwindSafe for MatchFlags
impl Send for MatchFlags
impl Sync for MatchFlags
impl Unpin for MatchFlags
impl UnsafeUnpin for MatchFlags
impl UnwindSafe for MatchFlags
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