pub struct FilePatch {
pub file_path: PathBuf,
pub original_content: String,
pub modified_content: String,
pub applied_fixes: Vec<AppliedFix>,
}Expand description
A patch containing original and modified file contents along with applied fixes.
Fields§
§file_path: PathBuf§original_content: String§modified_content: String§applied_fixes: Vec<AppliedFix>Implementations§
Source§impl FilePatch
impl FilePatch
pub fn has_changes(&self) -> bool
Sourcepub fn write_to_disk(&self) -> Result<()>
pub fn write_to_disk(&self) -> Result<()>
Write modified content to disk.
Sourcepub fn render_diff(&self) -> String
pub fn render_diff(&self) -> String
Generate a unified diff representation of the patch.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FilePatch
impl RefUnwindSafe for FilePatch
impl Send for FilePatch
impl Sync for FilePatch
impl Unpin for FilePatch
impl UnsafeUnpin for FilePatch
impl UnwindSafe for FilePatch
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