Rust wrapper type that implements hashing and comparison by pointer address
Rust
37
31 commits
updated Mar 27, 2024
Rust wrapper type that implements hashing and comparison based on address rather than value.
ByAddress can be used to wrap any pointer type (i.e. any type that implements the Deref
trait). This includes references, raw pointers, smart pointers like Rc<T>
and Box<T>, and specialized pointer-like types such as Vec<T> and String.
The wrapped pointer implements the following traits based on the address of its contents, rather than their value:
This crate does not depend on libstd, so it can be used in no_std
projects.
ByThinAddress as repr(transparent).from_ref constructor.ByThinAddress type.Display trait.Debug that includess the pointer address.From<T> for ByAddress<T>Licensed under the Apache License, Version 2.0 or the MIT license, at your option. See the license files in this directory for details.
Overall
Maintained
Code review
crates.io
Latest release
Releases this year
665 followers · starred Apr 2024
138 followers · starred Sep 2023
632 followers · starred Apr 2024
130 followers · starred Oct 2023
Rust wrapper type that implements hashing and comparison by pointer address
Rust
37
31 commits
updated Mar 27, 2024
Rust wrapper type that implements hashing and comparison based on address rather than value.
ByAddress can be used to wrap any pointer type (i.e. any type that implements the Deref
trait). This includes references, raw pointers, smart pointers like Rc<T>
and Box<T>, and specialized pointer-like types such as Vec<T> and String.
The wrapped pointer implements the following traits based on the address of its contents, rather than their value:
This crate does not depend on libstd, so it can be used in no_std
projects.
ByThinAddress as repr(transparent).from_ref constructor.ByThinAddress type.Display trait.Debug that includess the pointer address.From<T> for ByAddress<T>Licensed under the Apache License, Version 2.0 or the MIT license, at your option. See the license files in this directory for details.
Overall
Maintained
Code review
crates.io
Latest release
Releases this year
665 followers · starred Apr 2024
138 followers · starred Sep 2023
632 followers · starred Apr 2024
130 followers · starred Oct 2023