pub struct ScoreContribution {
pub module: String,
pub rule_id: String,
pub severity: Option<Severity>,
pub points: u32,
}Expand description
One recorded contribution to the anomaly score, kept for audit/logging.
Populated exclusively by the pipeline as it accumulates ctx.score.
Serialize/Deserialize so the per-rule breakdown can be emitted in the decision-log
(the core logs the array on a denied request) and reconstructed downstream — this is the
data the enterprise control-plane drill-down (§7) rebuilds the verdict from.
Fields§
§module: StringId of the module that produced the contribution.
rule_id: StringId of the rule that matched.
severity: Option<Severity>Severity class, when the contribution came from Decision::Scores.
None for direct Decision::Score contributions.
points: u32Points actually added to ctx.score.
Trait Implementations§
Source§impl Clone for ScoreContribution
impl Clone for ScoreContribution
Source§fn clone(&self) -> ScoreContribution
fn clone(&self) -> ScoreContribution
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ScoreContribution
impl Debug for ScoreContribution
Source§impl<'de> Deserialize<'de> for ScoreContribution
impl<'de> Deserialize<'de> for ScoreContribution
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ScoreContribution
Source§impl PartialEq for ScoreContribution
impl PartialEq for ScoreContribution
Source§fn eq(&self, other: &ScoreContribution) -> bool
fn eq(&self, other: &ScoreContribution) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ScoreContribution
impl Serialize for ScoreContribution
impl StructuralPartialEq for ScoreContribution
Auto Trait Implementations§
impl Freeze for ScoreContribution
impl RefUnwindSafe for ScoreContribution
impl Send for ScoreContribution
impl Sync for ScoreContribution
impl Unpin for ScoreContribution
impl UnsafeUnpin for ScoreContribution
impl UnwindSafe for ScoreContribution
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