pub struct SodRule {
pub rule_id: String,
pub name: String,
pub conflict_type: SodConflictType,
pub description: String,
pub is_active: bool,
pub risk_level: RiskLevel,
}Expand description
SoD rule that defines what constitutes a conflict.
Fields§
§rule_id: StringRule identifier
name: StringRule name
conflict_type: SodConflictTypeConflict type this rule detects
description: StringDescription of the rule
is_active: boolWhether this rule is active
risk_level: RiskLevelRisk level if this rule is violated
Implementations§
Source§impl SodRule
impl SodRule
Sourcepub fn new(
rule_id: impl Into<String>,
name: impl Into<String>,
conflict_type: SodConflictType,
) -> Self
pub fn new( rule_id: impl Into<String>, name: impl Into<String>, conflict_type: SodConflictType, ) -> Self
Create a new SoD rule.
Sourcepub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
Builder method to set description.
Sourcepub fn with_risk_level(self, level: RiskLevel) -> Self
pub fn with_risk_level(self, level: RiskLevel) -> Self
Builder method to set risk level.
Sourcepub fn standard_rules() -> Vec<Self>
pub fn standard_rules() -> Vec<Self>
Get standard SoD rules.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SodRule
impl<'de> Deserialize<'de> for SodRule
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 SodRule
impl RefUnwindSafe for SodRule
impl Send for SodRule
impl Sync for SodRule
impl Unpin for SodRule
impl UnwindSafe for SodRule
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