pub fn with<'a, FnI, FnS, S>(
old: &'a BStr,
new: &'a BStr,
algorithm: Algorithm,
new_input: FnI,
new_sink: FnS
) -> (InternedInput<&'a [u8]>, S::Out)where
FnI: FnOnce(&'a [u8], &'a [u8]) -> InternedInput<&'a [u8]>,
FnS: FnOnce(&InternedInput<&'a [u8]>) -> S,
S: Sink,
Expand description
Create a diff yielding the changes to turn old
into new
with algorithm
. new_input
obtains the old
and new
byte buffers and produces an interner, which is then passed to new_sink
for creating a processor over the changes.
See the imara-diff
crate documentation for information on how to implement a Sink
.