Skip to content

Commit

Permalink
Add README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
io12 committed Mar 10, 2020
1 parent 3b2c7ab commit ee60256
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[![](https://img.shields.io/crates/v/multi-eq)](https://crates.io/crates/multi-eq)
[![](https://docs.rs/multi-eq/badge.svg)](https://docs.rs/multi-eq)

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

```rust
/// 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](https://docs.rs/multi-eq/).

0 comments on commit ee60256

Please sign in to comment.