Struct diffs::Replace

source ·
pub struct Replace<D: Diff> { /* private fields */ }
Expand description

A “differ” that combines deletions and insertions to give blocks of maximal length, and replacements when appropriate.

Implementations

Trait Implementations

Called when lines with indices old (in the old version) and new (in the new version) start an section equal in both versions, of length len. Read more
Called when a section of length len, starting at old, needs to be deleted from the old version. Read more
Called when a section of the new version, of length new_len and starting at new, needs to be inserted at position `old’. Read more
Called when a section of the old version, starting at index old and of length old_len, needs to be replaced with a section of length new_len, starting at new, of the new version. Read more
Always called at the end of the algorithm.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.