by_address icon indicating copy to clipboard operation
by_address copied to clipboard

Support for Weak references?

Open Rua opened this issue 6 years ago • 1 comments

At the moment, you can't create a ByAddress wrapper for a Weak reference, because these don't implement the Deref trait, only strong references do. But it would certainly be useful to be able to hash and compare these by the address of the pointed-to value. Is there a way that this can be done?

Rua avatar Feb 10 '19 19:02 Rua

This could be done using the Weak::into_raw method, though I think it would need to be a separate type from ByAddress.

mbrubeck avatar Mar 26 '24 16:03 mbrubeck