A set of macros to allow your types to be compared based on where they are stored in memory. This is useful when two instances of a type should not be considered equal unless they are literally the same instance.
With this crate, you can derive AddressEq
, AddressOrd
, or AddressHash
depending on your needs.
```rust use address_cmp::AddressEq;
struct A { pub a: u8, }
let a1 = A { a: 0 }; let a2 = A { a: 0 };
assertne!(a1, a2); asserteq!(a1, a1); ```