pub struct RuleEngine { /* private fields */ }Expand description
The rule engine runs all enabled detectors against a request.
Implementations§
Source§impl RuleEngine
impl RuleEngine
pub fn new(config: RuleConfig, custom_rules: Vec<CustomRule>) -> Self
Sourcepub fn inspect(&self, req: &WafRequest) -> Option<WafDecision>
pub fn inspect(&self, req: &WafRequest) -> Option<WafDecision>
Inspect a request against all enabled rule categories.
Returns the first match as a WafDecision, or None if clean.
Auto Trait Implementations§
impl Freeze for RuleEngine
impl RefUnwindSafe for RuleEngine
impl Send for RuleEngine
impl Sync for RuleEngine
impl Unpin for RuleEngine
impl UnsafeUnpin for RuleEngine
impl UnwindSafe for RuleEngine
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