pub struct QuickFix {
pub title: String,
pub edit: Option<TextEdit>,
pub command: Option<String>,
pub is_preferred: bool,
}Expand description
A quick fix suggestion for a diagnostic.
Fields§
§title: StringHuman-readable title for the fix
edit: Option<TextEdit>Text edit to apply (if available)
command: Option<String>Shell command alternative (if no direct edit)
is_preferred: boolWhether this is the preferred fix
Implementations§
Source§impl QuickFix
impl QuickFix
Sourcepub fn with_edit(title: impl Into<String>, edit: TextEdit) -> Self
pub fn with_edit(title: impl Into<String>, edit: TextEdit) -> Self
Create a quick fix with a text edit.
Sourcepub fn with_command(
title: impl Into<String>,
command: impl Into<String>,
) -> Self
pub fn with_command( title: impl Into<String>, command: impl Into<String>, ) -> Self
Create a quick fix with a command.
Sourcepub fn suggestion(title: impl Into<String>) -> Self
pub fn suggestion(title: impl Into<String>) -> Self
Create a quick fix with just a description.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for QuickFix
impl<'de> Deserialize<'de> for QuickFix
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
Auto Trait Implementations§
impl Freeze for QuickFix
impl RefUnwindSafe for QuickFix
impl Send for QuickFix
impl Sync for QuickFix
impl Unpin for QuickFix
impl UnwindSafe for QuickFix
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