pub struct UnifiedDiffBuilder<'a, W, T>{ /* private fields */ }
Available on crate feature
blob
only.Expand description
A Sink
that creates a textual diff
in the format typically output by git or gnu-diff if the -u
option is used
Implementations§
Source§impl<'a, T> UnifiedDiffBuilder<'a, String, T>
impl<'a, T> UnifiedDiffBuilder<'a, String, T>
Sourcepub fn new(input: &'a InternedInput<T>) -> UnifiedDiffBuilder<'a, String, T>
pub fn new(input: &'a InternedInput<T>) -> UnifiedDiffBuilder<'a, String, T>
Create a new UnifiedDiffBuilder
for the given input
,
that will return a String
.
Source§impl<'a, W, T> UnifiedDiffBuilder<'a, W, T>
impl<'a, W, T> UnifiedDiffBuilder<'a, W, T>
Sourcepub fn with_writer(
input: &'a InternedInput<T>,
writer: W,
) -> UnifiedDiffBuilder<'a, W, T>
pub fn with_writer( input: &'a InternedInput<T>, writer: W, ) -> UnifiedDiffBuilder<'a, W, T>
Create a new UnifiedDiffBuilder
for the given input
,
that will writes it output to the provided implementation of Write
.
Trait Implementations§
Source§impl<W, T> Sink for UnifiedDiffBuilder<'_, W, T>
impl<W, T> Sink for UnifiedDiffBuilder<'_, W, T>
type Out = W
Source§fn finish(self) -> <UnifiedDiffBuilder<'_, W, T> as Sink>::Out
fn finish(self) -> <UnifiedDiffBuilder<'_, W, T> as Sink>::Out
This function is called after all calls to
process_change
are complete
to obtain the final diff resultSource§fn with_counter(self) -> Counter<Self>
fn with_counter(self) -> Counter<Self>
Utility method that constructs a
Counter
that tracks the total number
of inserted and removed tokens in the changes passed to process_change
.Auto Trait Implementations§
impl<'a, W, T> Freeze for UnifiedDiffBuilder<'a, W, T>where
W: Freeze,
impl<'a, W, T> RefUnwindSafe for UnifiedDiffBuilder<'a, W, T>where
W: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, W, T> Send for UnifiedDiffBuilder<'a, W, T>
impl<'a, W, T> Sync for UnifiedDiffBuilder<'a, W, T>
impl<'a, W, T> Unpin for UnifiedDiffBuilder<'a, W, T>where
W: Unpin,
impl<'a, W, T> UnwindSafe for UnifiedDiffBuilder<'a, W, T>where
W: UnwindSafe,
T: RefUnwindSafe,
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