pub struct ExecutionRiskScorer { /* private fields */ }Expand description
Risk scorer for execution plans
Implementations§
Source§impl ExecutionRiskScorer
impl ExecutionRiskScorer
Sourcepub fn with_critical_files(critical_files: HashSet<String>) -> Self
pub fn with_critical_files(critical_files: HashSet<String>) -> Self
Create a new risk scorer with custom critical files
Sourcepub fn with_approval_threshold(self, threshold: f32) -> Self
pub fn with_approval_threshold(self, threshold: f32) -> Self
Set the approval threshold
Sourcepub fn add_critical_file(&mut self, pattern: String)
pub fn add_critical_file(&mut self, pattern: String)
Add a critical file pattern
Sourcepub fn score_plan(&self, plan: &ExecutionPlan) -> RiskScore
pub fn score_plan(&self, plan: &ExecutionPlan) -> RiskScore
Calculate risk score for an execution plan
Feature: ricecoder-execution, Property 1: Risk Score Consistency Validates: Requirements 1.1, 1.2
Sourcepub fn requires_approval(&self, risk_score: &RiskScore) -> bool
pub fn requires_approval(&self, risk_score: &RiskScore) -> bool
Check if approval is required based on risk score
Trait Implementations§
Source§impl Clone for ExecutionRiskScorer
impl Clone for ExecutionRiskScorer
Source§fn clone(&self) -> ExecutionRiskScorer
fn clone(&self) -> ExecutionRiskScorer
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 ExecutionRiskScorer
impl Debug for ExecutionRiskScorer
Auto Trait Implementations§
impl Freeze for ExecutionRiskScorer
impl RefUnwindSafe for ExecutionRiskScorer
impl Send for ExecutionRiskScorer
impl Sync for ExecutionRiskScorer
impl Unpin for ExecutionRiskScorer
impl UnwindSafe for ExecutionRiskScorer
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