#[non_exhaustive]pub struct RecDraft {
pub target_ref: String,
pub action_kind: ActionKind,
pub summary: Summary,
pub severity: Severity,
pub proposal: Proposal,
pub evidence: Vec<String>,
pub evidence_query: Option<String>,
pub metric: Option<MetricSnapshot>,
pub confidence: f64,
pub importance: f64,
pub evalset_hash: Option<String>,
pub judged_by: Option<JudgedBy>,
}Expand description
What an analyzer emits. dedup_key, origin, and the params snapshot are
not here — the engine stamps them. Non-exhaustive so the engine can add
fields without breaking analyzers.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.target_ref: String§action_kind: ActionKind§summary: Summary§severity: Severity§proposal: Proposal§evidence: Vec<String>Bounded to ≤64 representative evidence hashes by the engine.
evidence_query: Option<String>§metric: Option<MetricSnapshot>§confidence: f64§importance: f64§evalset_hash: Option<String>Rule E1 pin for code_revision drafts (see validate_code_rules).
judged_by: Option<JudgedBy>Set when a decision backend’s probability shaped this draft (a sweep pair judged the same claim / not both true, a classified tool cause). Carried onto the recommendation; a judged recommendation never auto-applies.
Implementations§
Source§impl RecDraft
impl RecDraft
pub fn new( target_ref: impl Into<String>, action_kind: ActionKind, summary: Summary, proposal: Proposal, ) -> Self
pub fn judged_by(self, j: JudgedBy) -> Self
pub fn severity(self, s: Severity) -> Self
pub fn evidence(self, hashes: Vec<String>) -> Self
pub fn evidence_query(self, q: impl Into<String>) -> Self
pub fn metric(self, m: MetricSnapshot) -> Self
pub fn confidence(self, c: f64) -> Self
pub fn importance(self, i: f64) -> Self
pub fn evalset_hash(self, h: impl Into<String>) -> Self
Trait Implementations§
impl StructuralPartialEq for RecDraft
Auto Trait Implementations§
impl Freeze for RecDraft
impl RefUnwindSafe for RecDraft
impl Send for RecDraft
impl Sync for RecDraft
impl Unpin for RecDraft
impl UnsafeUnpin for RecDraft
impl UnwindSafe for RecDraft
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