pub enum Decision {
Allow,
Block {
rule_id: String,
reason: String,
},
Monitor {
rule_id: String,
},
Score {
rule_id: String,
points: u32,
},
Scores(Vec<ScoreItem>),
Reject {
rule_id: String,
reason: String,
status: u16,
retry_after: Option<u64>,
},
}Variants§
Allow
Block
Monitor
Score
A single contribution with explicit points — used for high-confidence rules or direct scoring where the module already knows the weight.
Scores(Vec<ScoreItem>)
Multiple contributions, one per matched rule, each carrying a severity.
The pipeline resolves severity -> points via [waf.severity_scores],
so the cumulative anomaly score (CRS-style) sums every matched rule —
three Notice matches weigh more than one.
Reject
Direct rejection with an explicit HTTP status — distinct from Block
(which is the 403 anomaly/high-confidence path). Used by rate limiting to
return 429 with an optional Retry-After (seconds). In detection-only the
pipeline logs it but does not reject.
Trait Implementations§
impl Eq for Decision
impl StructuralPartialEq for Decision
Auto Trait Implementations§
impl Freeze for Decision
impl RefUnwindSafe for Decision
impl Send for Decision
impl Sync for Decision
impl Unpin for Decision
impl UnsafeUnpin for Decision
impl UnwindSafe for Decision
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