pub trait TupleDiffer {
type Ok;
type Err;
// Required methods
fn diff_field<T>(&mut self, a: &T, b: &T)
where T: Diff + ?Sized;
fn end(self) -> Result<Self::Ok, Self::Err>;
// Provided method
fn skip_field<T: ?Sized>(&mut self) { ... }
}
Expand description
A type that can do something with information about differences in a tuple or tuple-like struct.
For two tuples to be of the same type (and thus be able to be diffed), they
must be the same length. For types that vary in length, you want a
SeqDiffer
instead.
Required Associated Types§
Required Methods§
Sourcefn diff_field<T>(&mut self, a: &T, b: &T)
fn diff_field<T>(&mut self, a: &T, b: &T)
Visits the next field in each tuple. The field number is implicit.
Provided Methods§
Sourcefn skip_field<T: ?Sized>(&mut self)
fn skip_field<T: ?Sized>(&mut self)
Signals that a field is being skipped. Some differs may do something with this information.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.