Trait DataEquiv

Source
pub trait DataEquiv<DATA> {
    // Required method
    fn data_equiv(&self, d1: &DATA, d2: &DATA) -> bool;

    // Provided method
    fn always_true(&self) -> bool { ... }
}
Expand description

Data equivalence relation.

Defines equivalence classes of declarations. Shadowing will only be applied with respect to declarations in the same equivalence class. That is, the shadowing explained in LabelOrder will only be applied if the declarations are equivalent.

Required Methods§

Source

fn data_equiv(&self, d1: &DATA, d2: &DATA) -> bool

Provided Methods§

Source

fn always_true(&self) -> bool

Implementors§

Source§

impl<DATA> DataEquiv<DATA> for DefaultDataEquiv

Source§

impl<DATA, T> DataEquiv<DATA> for T
where for<'sg> T: Fn(&'sg DATA, &'sg DATA) -> bool,