pub struct RiskAssessment {Show 37 fields
pub risk_id: Uuid,
pub risk_ref: String,
pub engagement_id: Uuid,
pub risk_category: RiskCategory,
pub account_or_process: String,
pub assertion: Option<Assertion>,
pub description: String,
pub inherent_risk: RiskLevel,
pub control_risk: RiskLevel,
pub risk_of_material_misstatement: RiskLevel,
pub is_significant_risk: bool,
pub significant_risk_rationale: Option<String>,
pub inherent_impact: f64,
pub inherent_likelihood: f64,
pub residual_impact: f64,
pub residual_likelihood: f64,
pub risk_score: f64,
pub risk_name: String,
pub mitigating_control_count: u32,
pub effective_control_count: u32,
pub status: RiskStatus,
pub fraud_risk_factors: Vec<FraudRiskFactor>,
pub presumed_revenue_fraud_risk: bool,
pub presumed_management_override: bool,
pub planned_response: Vec<PlannedResponse>,
pub response_nature: ResponseNature,
pub response_extent: String,
pub response_timing: ResponseTiming,
pub assessed_by: String,
pub assessed_date: NaiveDate,
pub review_status: RiskReviewStatus,
pub reviewer_id: Option<String>,
pub review_date: Option<NaiveDate>,
pub workpaper_refs: Vec<Uuid>,
pub related_controls: Vec<String>,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
}Expand description
Risk assessment for an account or process.
Fields§
§risk_id: UuidUnique risk ID
risk_ref: StringExternal reference
engagement_id: UuidEngagement ID
risk_category: RiskCategoryRisk category
account_or_process: StringAccount or process being assessed
assertion: Option<Assertion>Specific assertion if applicable
description: StringRisk description
inherent_risk: RiskLevelInherent risk assessment
control_risk: RiskLevelControl risk assessment
risk_of_material_misstatement: RiskLevelCombined risk of material misstatement
is_significant_risk: boolIs this a significant risk per ISA 315?
significant_risk_rationale: Option<String>Rationale for significant risk designation
inherent_impact: f64Inherent impact score (0.0-1.0), derived from inherent_risk level
inherent_likelihood: f64Inherent likelihood score (0.0-1.0), derived from inherent_risk level
residual_impact: f64Residual impact score (0.0-1.0), derived from control_risk level
residual_likelihood: f64Residual likelihood score (0.0-1.0), derived from control_risk level
risk_score: f64Composite risk score: inherent_impact * inherent_likelihood * 100
risk_name: StringHuman-readable risk name (e.g. “Revenue Recognition Risk High”)
mitigating_control_count: u32Number of mitigating controls linked to this risk
effective_control_count: u32Number of effective (passing) controls among mitigating controls
status: RiskStatusRisk lifecycle status (Active, Mitigated, Accepted, Closed)
fraud_risk_factors: Vec<FraudRiskFactor>Fraud risk factors identified
presumed_revenue_fraud_risk: boolPresumed fraud risk in revenue recognition?
presumed_management_override: boolPresumed management override risk?
planned_response: Vec<PlannedResponse>Planned audit response
response_nature: ResponseNatureNature of procedures (substantive, control, combined)
response_extent: StringExtent (sample size considerations)
response_timing: ResponseTimingTiming (interim, year-end, subsequent)
assessed_by: StringAssessed by user ID
assessed_date: NaiveDateAssessment date
review_status: RiskReviewStatusReview status
reviewer_id: Option<String>Reviewer ID
review_date: Option<NaiveDate>Review date
workpaper_refs: Vec<Uuid>Related workpaper IDs
Related control IDs
created_at: DateTime<Utc>§updated_at: DateTime<Utc>Implementations§
Source§impl RiskAssessment
impl RiskAssessment
Sourcepub fn new(
engagement_id: Uuid,
risk_category: RiskCategory,
account_or_process: &str,
description: &str,
) -> Self
pub fn new( engagement_id: Uuid, risk_category: RiskCategory, account_or_process: &str, description: &str, ) -> Self
Create a new risk assessment.
Sourcepub fn with_assertion(self, assertion: Assertion) -> Self
pub fn with_assertion(self, assertion: Assertion) -> Self
Set the assertion being assessed.
Sourcepub fn with_risk_levels(self, inherent: RiskLevel, control: RiskLevel) -> Self
pub fn with_risk_levels(self, inherent: RiskLevel, control: RiskLevel) -> Self
Set risk levels and recompute continuous scores.
Sourcepub fn mark_significant(self, rationale: &str) -> Self
pub fn mark_significant(self, rationale: &str) -> Self
Mark as significant risk.
Sourcepub fn add_fraud_factor(&mut self, factor: FraudRiskFactor)
pub fn add_fraud_factor(&mut self, factor: FraudRiskFactor)
Add a fraud risk factor.
Sourcepub fn add_response(&mut self, response: PlannedResponse)
pub fn add_response(&mut self, response: PlannedResponse)
Add a planned response.
Sourcepub fn with_assessed_by(self, user_id: &str, date: NaiveDate) -> Self
pub fn with_assessed_by(self, user_id: &str, date: NaiveDate) -> Self
Set who assessed this risk.
Sourcepub fn required_detection_risk(&self) -> DetectionRisk
pub fn required_detection_risk(&self) -> DetectionRisk
Get the detection risk needed to achieve acceptable audit risk.
Sourcepub fn requires_special_consideration(&self) -> bool
pub fn requires_special_consideration(&self) -> bool
Check if this risk requires special audit consideration.
Trait Implementations§
Source§impl Clone for RiskAssessment
impl Clone for RiskAssessment
Source§fn clone(&self) -> RiskAssessment
fn clone(&self) -> RiskAssessment
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RiskAssessment
impl Debug for RiskAssessment
Source§impl<'de> Deserialize<'de> for RiskAssessment
impl<'de> Deserialize<'de> for RiskAssessment
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>,
Auto Trait Implementations§
impl Freeze for RiskAssessment
impl RefUnwindSafe for RiskAssessment
impl Send for RiskAssessment
impl Sync for RiskAssessment
impl Unpin for RiskAssessment
impl UnsafeUnpin for RiskAssessment
impl UnwindSafe for RiskAssessment
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.