pub trait Comparable {
    type Desc: PartialEq + Debug;
    type Change: PartialEq + Debug;

    fn describe(&self) -> Self::Desc;
    fn comparison(&self, other: &Self) -> Changed<Self::Change>Notable traits for Changed<T>impl<T> Iterator for Changed<T>    type Item = T;;
}

Required Associated Types

Describes the type under consideration. For types that use #[derive(Comparable)] this is a mirror of the type itself, where all field types refer to the Comparable::Desc associated type of the original type.

Reflects all changes between two values of a type. The exact nature of this type depends on the type being compared, for example, singleton struts vary from structs with multiple fields. Please see the full documentation for more details.

Required Methods

Describe a value of a type.

Compare two values of a type, reporting whether they differ and what the complete set of differences looks like. This is used by the comparable::assert_changes function so that tests can ensure that what was expected to happen did happen – and nothing more.

Implementations on Foreign Types

Implementors