multi-eq

Crates.iomulti-eq
lib.rsmulti-eq
version0.1.1
sourcesrc
created_at2020-03-10 22:27:22.58675
updated_at2020-03-10 23:47:16.593312
descriptionMacros for creating custom equality trait derives
homepage
repositoryhttps://github.com/Wright-Language-Developers/multi-eq-rs/
max_upload_size
id217396
size16,731
Benjamin Levy (io12)

documentation

README

multi_eq

multi_eq is a macro library for creating custom equality trait derives.

/// Custom comparison trait `CustomEq` with a method `custom_eq`
multi_eq_make_trait!(CustomEq, custom_eq);

#[derive(CustomEq)]
struct MyStruct {
  // Use `PartialEq` to compare this field
  #[custom_eq(cmp = "eq")]
  a: u32,

  // Ignore value of this field when checking equality
  #[custom_eq(ignore)]
  b: bool,
}

For more information, see the documentation.

Commit count: 35

cargo fmt