Skip to main content

DiffInfo

Trait DiffInfo 

Source
pub trait DiffInfo {
    // Required methods
    fn is_empty(&self) -> bool;
    fn change_count(&self) -> usize;
}
Expand description

Metadata about a diff.

Required Methods§

Source

fn is_empty(&self) -> bool

Whether the diff represents no changes (identity patch).

Source

fn change_count(&self) -> usize

Number of changed fields/variants.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl DiffInfo for UnitDiff

Source§

impl DiffInfo for VoidDiff

Source§

impl<HD: DiffInfo, TD: DiffInfo> DiffInfo for ProductDiff<HD, TD>

Source§

impl<LD: DiffInfo, RD: DiffInfo, L, R> DiffInfo for SumDiff<LD, RD, L, R>

Source§

impl<T> DiffInfo for Delta<T>