pub struct CraGenerator { /* private fields */ }Expand description
Generator for Combined Risk Assessments per ISA 315.
Implementations§
Source§impl CraGenerator
impl CraGenerator
Sourcepub fn new(seed: u64) -> Self
pub fn new(seed: u64) -> Self
Create a new generator with the given seed and default configuration.
Sourcepub fn with_config(seed: u64, config: CraGeneratorConfig) -> Self
pub fn with_config(seed: u64, config: CraGeneratorConfig) -> Self
Create a new generator with custom configuration.
Sourcepub fn generate_for_entity(
&mut self,
entity_code: &str,
control_effectiveness: Option<&HashMap<String, RiskRating>>,
) -> Vec<CombinedRiskAssessment>
pub fn generate_for_entity( &mut self, entity_code: &str, control_effectiveness: Option<&HashMap<String, RiskRating>>, ) -> Vec<CombinedRiskAssessment>
Generate CRAs for all standard account areas for a single entity.
§Arguments
entity_code— The entity being assessed.control_effectiveness— Optional map from account area name to control risk override. WhenNonefor an area the generator picks control risk randomly using the configured probabilities.
Auto Trait Implementations§
impl Freeze for CraGenerator
impl RefUnwindSafe for CraGenerator
impl Send for CraGenerator
impl Sync for CraGenerator
impl Unpin for CraGenerator
impl UnsafeUnpin for CraGenerator
impl UnwindSafe for CraGenerator
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