pub enum FixDetails {
TextReplace {
file_path: PathBuf,
line_start: usize,
column_start: usize,
line_end: usize,
column_end: usize,
original_text_snippet: Option<String>,
replacement_text: String,
},
AddImport {
file_path: String,
import: String,
},
AddCargoDependency {
dependency: String,
version: String,
features: Vec<String>,
is_dev_dependency: bool,
},
ExecuteCommand {
command: String,
args: Vec<String>,
working_directory: Option<PathBuf>,
},
SuggestCommand {
command: String,
explanation: String,
},
SuggestCodeChange {
file_path: PathBuf,
line_hint: usize,
suggested_code_snippet: String,
explanation: String,
},
}
Expand description
Detailed information for specific fix types
Variants§
TextReplace
Replace text in a file with new content
Fields
AddImport
Add an import statement to a file
Fields
AddCargoDependency
Add a dependency to Cargo.toml
Fields
ExecuteCommand
Execute a command to fix the issue
Fields
SuggestCommand
Suggest a command to run to fix the issue
Fields
SuggestCodeChange
Suggest a code change without applying it
Trait Implementations§
Source§impl Clone for FixDetails
impl Clone for FixDetails
Source§fn clone(&self) -> FixDetails
fn clone(&self) -> FixDetails
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 moreSource§impl Debug for FixDetails
impl Debug for FixDetails
Source§impl PartialEq for FixDetails
impl PartialEq for FixDetails
impl Eq for FixDetails
impl StructuralPartialEq for FixDetails
Auto Trait Implementations§
impl Freeze for FixDetails
impl RefUnwindSafe for FixDetails
impl Send for FixDetails
impl Sync for FixDetails
impl Unpin for FixDetails
impl UnwindSafe for FixDetails
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