pub struct RiskSignals {
pub counts_by_label: BTreeMap<PrivacyLabel, u32>,
pub total_risk_delta: u32,
pub has_secret: bool,
}Expand description
聚合风险信号。纯派生数据,可从 findings 重算;先算好避免 caller 每次重跑。
Fields§
§counts_by_label: BTreeMap<PrivacyLabel, u32>按 PrivacyLabel 分档计数(未识别 kind 不计入此 map,但仍保留在 findings)。
total_risk_delta: u32总风险分 = sum(finding.risk_delta)。
继承 ISS-013 D4 不变量:同 span 重叠时 Model 已在 merge 时被 drop,不双倍。
has_secret: bool是否含至少一个 Secret 类 finding(caller 可直接作 fail-closed 早判)。
Trait Implementations§
Source§impl Clone for RiskSignals
impl Clone for RiskSignals
Source§fn clone(&self) -> RiskSignals
fn clone(&self) -> RiskSignals
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 RiskSignals
impl Debug for RiskSignals
Source§impl Default for RiskSignals
impl Default for RiskSignals
Source§fn default() -> RiskSignals
fn default() -> RiskSignals
Returns the “default value” for a type. Read more
Source§impl PartialEq for RiskSignals
impl PartialEq for RiskSignals
Source§fn eq(&self, other: &RiskSignals) -> bool
fn eq(&self, other: &RiskSignals) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RiskSignals
Auto Trait Implementations§
impl Freeze for RiskSignals
impl RefUnwindSafe for RiskSignals
impl Send for RiskSignals
impl Sync for RiskSignals
impl Unpin for RiskSignals
impl UnsafeUnpin for RiskSignals
impl UnwindSafe for RiskSignals
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