pub struct AnomalySeverity {
pub level: SeverityLevel,
pub score: f64,
pub financial_impact: Decimal,
pub is_material: bool,
pub materiality_threshold: Option<Decimal>,
}Expand description
Structured severity scoring for anomalies.
Fields§
§level: SeverityLevelSeverity level classification.
score: f64Continuous severity score (0.0-1.0).
financial_impact: DecimalAbsolute financial impact amount.
is_material: boolWhether this exceeds materiality threshold.
materiality_threshold: Option<Decimal>Materiality threshold used for determination.
Implementations§
Source§impl AnomalySeverity
impl AnomalySeverity
Sourcepub fn new(level: SeverityLevel, financial_impact: Decimal) -> Self
pub fn new(level: SeverityLevel, financial_impact: Decimal) -> Self
Creates a new severity assessment.
Sourcepub fn from_score(score: f64, financial_impact: Decimal) -> Self
pub fn from_score(score: f64, financial_impact: Decimal) -> Self
Creates severity from a score, auto-determining level.
Sourcepub fn with_materiality(self, threshold: Decimal) -> Self
pub fn with_materiality(self, threshold: Decimal) -> Self
Sets the materiality assessment.
Trait Implementations§
Source§impl Clone for AnomalySeverity
impl Clone for AnomalySeverity
Source§fn clone(&self) -> AnomalySeverity
fn clone(&self) -> AnomalySeverity
Returns a duplicate of the value. Read more
1.0.0 · 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 AnomalySeverity
impl Debug for AnomalySeverity
Source§impl Default for AnomalySeverity
impl Default for AnomalySeverity
Source§impl<'de> Deserialize<'de> for AnomalySeverity
impl<'de> Deserialize<'de> for AnomalySeverity
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
Auto Trait Implementations§
impl Freeze for AnomalySeverity
impl RefUnwindSafe for AnomalySeverity
impl Send for AnomalySeverity
impl Sync for AnomalySeverity
impl Unpin for AnomalySeverity
impl UnwindSafe for AnomalySeverity
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