pub struct SuggestedFix {
pub label: String,
pub diff: Option<String>,
pub confidence: f32,
}Expand description
A suggested fix — a ranked, optionally-diff-bearing proposal that a
renderer (LSP code action, MCP apply_fix tool call) can apply.
confidence is in [0.0, 1.0]. Phase-2 first-session emitters may
produce empty fixes lists; richer fix generation is later-session
scope per the dispatch.
Fields§
§label: StringShort user-facing label (e.g. "convert string to int").
diff: Option<String>Optional unified-diff fragment. Renderers that can apply diffs (LSP, MCP) consume this directly. May be empty.
confidence: f32Confidence in the fix, 0.0..=1.0. Renderers may rank by this.
Implementations§
Trait Implementations§
Source§impl Clone for SuggestedFix
impl Clone for SuggestedFix
Source§fn clone(&self) -> SuggestedFix
fn clone(&self) -> SuggestedFix
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 SuggestedFix
impl Debug for SuggestedFix
Source§impl<'de> Deserialize<'de> for SuggestedFix
impl<'de> Deserialize<'de> for SuggestedFix
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SuggestedFix
impl PartialEq for SuggestedFix
Source§fn eq(&self, other: &SuggestedFix) -> bool
fn eq(&self, other: &SuggestedFix) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SuggestedFix
impl Serialize for SuggestedFix
impl StructuralPartialEq for SuggestedFix
Auto Trait Implementations§
impl Freeze for SuggestedFix
impl RefUnwindSafe for SuggestedFix
impl Send for SuggestedFix
impl Sync for SuggestedFix
impl Unpin for SuggestedFix
impl UnsafeUnpin for SuggestedFix
impl UnwindSafe for SuggestedFix
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