pub struct PreviewGenerator;Expand description
Generates previews of refactoring operations
Implementations§
Source§impl PreviewGenerator
impl PreviewGenerator
Sourcepub fn generate(refactoring: &Refactoring) -> Result<RefactoringPreview>
pub fn generate(refactoring: &Refactoring) -> Result<RefactoringPreview>
Generate a preview of a refactoring
Sourcepub fn generate_unified_diff(original: &str, new: &str) -> String
pub fn generate_unified_diff(original: &str, new: &str) -> String
Generate a unified diff between original and new content
Returns a unified diff format string that shows the changes between the original and new content.
Sourcepub fn generate_side_by_side_diff(original: &str, new: &str) -> String
pub fn generate_side_by_side_diff(original: &str, new: &str) -> String
Generate a side-by-side diff between original and new content
Returns a side-by-side diff format that shows original and new content side by side for easier comparison.
Sourcepub fn generate_diff(original: &str, new: &str) -> String
pub fn generate_diff(original: &str, new: &str) -> String
Generate a diff for a file change
This is a convenience method that generates a unified diff between the original and new content.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PreviewGenerator
impl RefUnwindSafe for PreviewGenerator
impl Send for PreviewGenerator
impl Sync for PreviewGenerator
impl Unpin for PreviewGenerator
impl UnwindSafe for PreviewGenerator
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