pub struct PatchProposal {
pub rule_id: String,
pub ops: Vec<PatchOp>,
pub rationale: String,
pub confidence: Option<f64>,
}Expand description
A model-generated repair proposal.
Contains one or more PatchOps plus metadata for audit. Proposals are
validated against the current RepairMode and monotonicity checker before
any operations are applied.
Fields§
§rule_id: StringWhich rule triggered this proposal.
ops: Vec<PatchOp>Ordered list of operations to apply.
rationale: StringModel-provided rationale (for audit log).
confidence: Option<f64>Confidence score (0.0–1.0) from the model, if available.
Implementations§
Source§impl PatchProposal
impl PatchProposal
Sourcepub fn max_risk(&self) -> RepairRisk
pub fn max_risk(&self) -> RepairRisk
The highest risk across all ops in the proposal.
Sourcepub fn is_allowed_by(&self, mode: RepairMode) -> bool
pub fn is_allowed_by(&self, mode: RepairMode) -> bool
Whether this proposal is allowed under the given mode.
Trait Implementations§
Source§impl Clone for PatchProposal
impl Clone for PatchProposal
Source§fn clone(&self) -> PatchProposal
fn clone(&self) -> PatchProposal
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 moreAuto Trait Implementations§
impl Freeze for PatchProposal
impl RefUnwindSafe for PatchProposal
impl Send for PatchProposal
impl Sync for PatchProposal
impl Unpin for PatchProposal
impl UnsafeUnpin for PatchProposal
impl UnwindSafe for PatchProposal
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).
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