pub struct SimpleDiff<'a> { /* private fields */ }
Expand description

A console printable diff.

The Display implementation of this type renders out a diff with ANSI markers so it creates a nice colored diff. This can be used to build your own custom assertions in addition to the ones from this crate.

It does not provide much customization beyond what’s possible done by default.

Implementations

Creates a diff from two strings.

left_label and right_label are the labels used for the two sides. "left" and "right" are sensible defaults if you don’t know what to pick.

Trait Implementations

Formats the value using the given formatter. Read more

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.

Converts the given value to a String. Read more

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.