#equality #pointers #identity #comparison #rc #partial-eq #done

refid

Newtype enabling identity comparison (e.g. through pointer equality)

5 unstable releases

0.2.1 Nov 5, 2021
0.2.0 Nov 5, 2021
0.1.0 Nov 2, 2021
0.0.3 Nov 1, 2021
0.0.1 Oct 30, 2021

#2530 in Rust patterns

24 downloads per month

MIT/Apache

11KB
211 lines

Changelog

  • Version 0.2.1
    • added implementations for std::rc::Weak and std::sync::Weak
    • added ByIdDeref wrapper
  • Version 0.2.0
    • renamed RefId to ById
    • use new trait Id to determine identity, instead of Deref and pointer comparison
  • Version 0.1.0
    • derive Copy for RefId
  • Version 0.0.3
    • minor fix in documentation
  • Version 0.0.2
    • support smart pointers (through Deref)
  • Version 0.0.1

lib.rs:

A small crate to enable identity checks (e.g. through pointer comparison) in contrast to equality checks (as done by PartialEq)

No runtime deps