anders429 / hashable_rc Goto Github PK
View Code? Open in Web Editor NEWRust - Hashable wrappers for reference countings.
License: MIT License
Rust - Hashable wrappers for reference countings.
License: MIT License
by_address
is a far better implementation of this, providing hashing by address to any pointer type. While it doesn't provide it for Weak
, that's probably for the better, since in retrospect the hashing via address on Weak
is unsound anyway, as it doesn't follow the rules required for a type to implement Hash
, as the pointer location is variable even when the Weak
pointer is not itself mutated.
The following steps should be taken to correctly deprecate this crate:
by_address
crate as an alternative.Weak
wrapper isn't actually sound.I want to be able to iterate over the (key, value)
's of a HashMap
in which the key is a HashableRc
, but with HashableRc
I cannot get the original Rc
back. Since HashableRc
holds a clone of the Rc
, it would be trivial to add a get_cloned()
method to HashableRc
for my use case. What do you think? Would you be agreeable to a PR?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.