pub struct DiffGenerator;Expand description
Diff generator for creating visual diffs
Implementations§
Source§impl DiffGenerator
impl DiffGenerator
Sourcepub fn generate(source: &Path, destination: &Path) -> Result<String>
pub fn generate(source: &Path, destination: &Path) -> Result<String>
Generate a color-coded unified diff between two files
§Errors
Returns an error if files cannot be read.
Sourcepub fn generate_from_content(
source_content: &str,
dest_content: &str,
source_path: &Path,
dest_path: &Path,
) -> String
pub fn generate_from_content( source_content: &str, dest_content: &str, source_path: &Path, dest_path: &Path, ) -> String
Generate a diff from string contents
Sourcepub fn generate_plain(source: &Path, destination: &Path) -> Result<String>
pub fn generate_plain(source: &Path, destination: &Path) -> Result<String>
Generate a simple line-by-line diff without colors (for testing)
§Errors
Returns an error if files cannot be read.
Sourcepub fn generate_directory_summary(
comparison: &DirectoryComparison,
source_dir: &Path,
dest_dir: &Path,
skill_name: &str,
) -> Result<String>
pub fn generate_directory_summary( comparison: &DirectoryComparison, source_dir: &Path, dest_dir: &Path, skill_name: &str, ) -> Result<String>
Generate a summary diff for directories
Shows files to add, modify, and remove with line count information for modified files.
§Errors
Returns an error if file I/O operations fail.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DiffGenerator
impl RefUnwindSafe for DiffGenerator
impl Send for DiffGenerator
impl Sync for DiffGenerator
impl Unpin for DiffGenerator
impl UnwindSafe for DiffGenerator
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