pub struct PatternFeatures {
pub has_captures: bool,
pub has_named_captures: bool,
pub has_backrefs: bool,
pub has_lookarounds: bool,
pub has_anchors: bool,
pub has_word_boundaries: bool,
}Expand description
Features detected in a pattern
Fields§
§has_captures: boolPattern has capture groups
has_named_captures: boolPattern has named capture groups
has_backrefs: boolPattern has backreferences
has_lookarounds: boolPattern has lookarounds
has_anchors: boolPattern has anchors (^, $, \A, \z)
has_word_boundaries: boolPattern has word boundaries (\b, \B)
Implementations§
Source§impl PatternFeatures
impl PatternFeatures
Sourcepub fn needs_simplification(&self) -> bool
pub fn needs_simplification(&self) -> bool
Check if pattern needs simplification for Hyperscan
Sourcepub fn needs_extraction(&self) -> bool
pub fn needs_extraction(&self) -> bool
Check if pattern needs regex for extraction
Trait Implementations§
Source§impl Clone for PatternFeatures
impl Clone for PatternFeatures
Source§fn clone(&self) -> PatternFeatures
fn clone(&self) -> PatternFeatures
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 PatternFeatures
impl Debug for PatternFeatures
Source§impl Default for PatternFeatures
impl Default for PatternFeatures
Source§fn default() -> PatternFeatures
fn default() -> PatternFeatures
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PatternFeatures
impl RefUnwindSafe for PatternFeatures
impl Send for PatternFeatures
impl Sync for PatternFeatures
impl Unpin for PatternFeatures
impl UnwindSafe for PatternFeatures
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