pub struct RiskAssessmentEngine { /* private fields */ }Expand description
Risk assessment engine
Implementations§
Source§impl RiskAssessmentEngine
impl RiskAssessmentEngine
Sourcepub fn new(config: RiskAssessmentConfig) -> Self
pub fn new(config: RiskAssessmentConfig) -> Self
Create a new risk assessment engine
Sourcepub async fn create_risk(
&self,
title: String,
description: String,
category: RiskCategory,
likelihood: Likelihood,
impact: Impact,
created_by: Uuid,
) -> Result<Risk, Error>
pub async fn create_risk( &self, title: String, description: String, category: RiskCategory, likelihood: Likelihood, impact: Impact, created_by: Uuid, ) -> Result<Risk, Error>
Create a new risk
Sourcepub async fn get_risks_by_level(
&self,
level: RiskLevel,
) -> Result<Vec<Risk>, Error>
pub async fn get_risks_by_level( &self, level: RiskLevel, ) -> Result<Vec<Risk>, Error>
Get risks by level
Sourcepub async fn get_risks_by_category(
&self,
category: RiskCategory,
) -> Result<Vec<Risk>, Error>
pub async fn get_risks_by_category( &self, category: RiskCategory, ) -> Result<Vec<Risk>, Error>
Get risks by category
Sourcepub async fn get_risks_by_treatment_status(
&self,
status: TreatmentStatus,
) -> Result<Vec<Risk>, Error>
pub async fn get_risks_by_treatment_status( &self, status: TreatmentStatus, ) -> Result<Vec<Risk>, Error>
Get risks by treatment status
Sourcepub async fn update_risk_assessment(
&self,
risk_id: &str,
likelihood: Option<Likelihood>,
impact: Option<Impact>,
) -> Result<(), Error>
pub async fn update_risk_assessment( &self, risk_id: &str, likelihood: Option<Likelihood>, impact: Option<Impact>, ) -> Result<(), Error>
Update risk likelihood and impact
Sourcepub async fn update_treatment_plan(
&self,
risk_id: &str,
treatment_option: TreatmentOption,
treatment_plan: Vec<String>,
treatment_owner: Option<String>,
treatment_deadline: Option<DateTime<Utc>>,
) -> Result<(), Error>
pub async fn update_treatment_plan( &self, risk_id: &str, treatment_option: TreatmentOption, treatment_plan: Vec<String>, treatment_owner: Option<String>, treatment_deadline: Option<DateTime<Utc>>, ) -> Result<(), Error>
Update treatment plan
Sourcepub async fn update_treatment_status(
&self,
risk_id: &str,
status: TreatmentStatus,
) -> Result<(), Error>
pub async fn update_treatment_status( &self, risk_id: &str, status: TreatmentStatus, ) -> Result<(), Error>
Update treatment status
Sourcepub async fn set_residual_risk(
&self,
risk_id: &str,
residual_likelihood: Likelihood,
residual_impact: Impact,
) -> Result<(), Error>
pub async fn set_residual_risk( &self, risk_id: &str, residual_likelihood: Likelihood, residual_impact: Impact, ) -> Result<(), Error>
Set residual risk
Sourcepub async fn review_risk(
&self,
risk_id: &str,
reviewed_by: Uuid,
) -> Result<(), Error>
pub async fn review_risk( &self, risk_id: &str, reviewed_by: Uuid, ) -> Result<(), Error>
Review risk
Sourcepub async fn get_risk_summary(&self) -> Result<RiskSummary, Error>
pub async fn get_risk_summary(&self) -> Result<RiskSummary, Error>
Get risk summary
Auto Trait Implementations§
impl Freeze for RiskAssessmentEngine
impl !RefUnwindSafe for RiskAssessmentEngine
impl Send for RiskAssessmentEngine
impl Sync for RiskAssessmentEngine
impl Unpin for RiskAssessmentEngine
impl !UnwindSafe for RiskAssessmentEngine
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
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more