It doesn't. If you are on nightly you could use the hash of the pointer, but on stable you'd have to do this:
- Upgrade it to an
Rc
. (you can consider all failing upgrades as equal) - Obtain the pointer using
Rc::into_raw
and cache it as an integer you can hash. - Turn the pointer back into an
Rc
usingRc::from_raw
to avoid a memory leak from step 2 and immediately drop the resultingRc
.
Then you can save the pointer and use it to compute the hash.