same 0.1.0

Traits for testing identity of objects.
Documentation
  • Coverage
  • 100%
    6 out of 6 items documented2 out of 5 items with examples
  • Size
  • Source code size: 7.82 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 359.59 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 9s Average build duration of successful builds.
  • all releases: 9s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Kixunil/same
    4 2 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Kixunil

Same

A crate for comparing references in generic way.

About

This crate provides mainly the trait Some which can be used on shared reference types. (&T, Rc, Arc). It enables the users to test identity of objects. It's analogous to PartialEq, which tests equality instead.

Additionally, this crate provides RefHash trait, which is used for hashing references and RefCmp wrapper struct, which implements Eq, PartialEq and Hash by delegating to Same and RefHash traits. This is mainly useful if one wants to store objects in HashSet or similar data structure, with.

This crate is no_std-compatible.

License

MITNFA