pub enum Pattern {
Begin,
End,
BeginFile,
EndFile,
Expr(Expr),
Regex(String),
Range {
start: Box<Pattern>,
end: Box<Pattern>,
},
And(Box<Pattern>, Box<Pattern>),
Or(Box<Pattern>, Box<Pattern>),
Not(Box<Pattern>),
}Expand description
Pattern types that can trigger a rule
Variants§
Begin
BEGIN - runs before any input
End
END - runs after all input
BeginFile
BEGINFILE - runs at the start of each input file (gawk extension)
EndFile
ENDFILE - runs at the end of each input file (gawk extension)
Expr(Expr)
Expression that evaluates to true/false
Regex(String)
Regex pattern: /pattern/
Range
Range pattern: /start/,/end/
And(Box<Pattern>, Box<Pattern>)
Compound patterns with logical operators
Or(Box<Pattern>, Box<Pattern>)
Not(Box<Pattern>)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Pattern
impl RefUnwindSafe for Pattern
impl Send for Pattern
impl Sync for Pattern
impl Unpin for Pattern
impl UnwindSafe for Pattern
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