Expand description
This file includes Pattern
s’ data structures and implementations.
Structs§
- Compiled
Pattern - A
CompiledPattern
is aPattern
whose RegEx has been compiled or, in the case that thePatternType
is raw, whose expression has been RegEx escaped and then compiled (as RegEx). - Pattern
- The
Pattern
struct represents an uncompiled pattern. Patterns are essentially RegEx searches; given an expression, they theoretically will match text. Note that in order for patterns to actually match text, they must first be compiled. (SeeCompiledPattern
). - Pattern
Match PatternMatch
es are whatCompiledPattern
s output when they encounter text that matches. APatternMatch
contains an excerpt of the match.
Enums§
- Pattern
Kind PatternKind
denotes the type of a pattern. Its two variants,RegEx
andRaw
, denote the type of compilation and matching to perform.