pub enum Operator {
Rx(String),
Pm(Vec<String>),
PmFromFile(String),
Contains(String),
BeginsWith(String),
EndsWith(String),
Within(String),
StrEq(String),
Unsupported(String),
}Expand description
One ModSecurity operator. The string argument is kept raw at parse time; @rx is
compiled to a regex::Regex later (in the loader/init), never in inspect.
Variants§
Rx(String)
@rx <pattern> — the pattern is compiled later.
Pm(Vec<String>)
@pm <phrase1> <phrase2> … — case-insensitive multi-phrase match (any phrase).
PmFromFile(String)
@pmf <path> / @pmFromFile <path> — phrases from a file, resolved by the loader
(file I/O is not done at parse time). Becomes Operator::Pm once read.
Contains(String)
@contains <s> — target contains s.
BeginsWith(String)
@beginsWith <s>.
EndsWith(String)
@endsWith <s>.
Within(String)
@within <set> — target value is a substring of set.
StrEq(String)
@streq <s> — exact string equality.
Unsupported(String)
An operator outside the v1 subset (@detectSQLi, @ipMatch, @eq, …) → rule Skipped.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Operator
impl RefUnwindSafe for Operator
impl Send for Operator
impl Sync for Operator
impl Unpin for Operator
impl UnsafeUnpin for Operator
impl UnwindSafe for Operator
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