pub struct UnifiedDiff<'a, T, D>{ /* private fields */ }Available on crate feature
blob only.Expand description
A helper that renders a Diff as unified diff output.
It can be used to create a textual diff in the format typically output by git
or gnu-diff if the -u option is used.
Implementations§
Source§impl<'a, T, D> UnifiedDiff<'a, T, D>
impl<'a, T, D> UnifiedDiff<'a, T, D>
Sourcepub fn new(
diff: &'a Diff,
input: &'a InternedInput<T>,
consume_hunk: D,
context_size: ContextSize,
) -> Self
pub fn new( diff: &'a Diff, input: &'a InternedInput<T>, consume_hunk: D, context_size: ContextSize, ) -> Self
Create a new instance to create a unified diff from diff using the lines in input.
context_size is the amount of lines around each hunk which will be passed to consume_hunk.
consume_hunk is called for each hunk with all the information required to create a unified diff.
Auto Trait Implementations§
impl<'a, T, D> Freeze for UnifiedDiff<'a, T, D>where
D: Freeze,
impl<'a, T, D> !RefUnwindSafe for UnifiedDiff<'a, T, D>
impl<'a, T, D> Send for UnifiedDiff<'a, T, D>
impl<'a, T, D> Sync for UnifiedDiff<'a, T, D>
impl<'a, T, D> Unpin for UnifiedDiff<'a, T, D>where
D: Unpin,
impl<'a, T, D> UnsafeUnpin for UnifiedDiff<'a, T, D>where
D: UnsafeUnpin,
impl<'a, T, D> !UnwindSafe for UnifiedDiff<'a, T, D>
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