Address of a Weak<T>

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:

  1. Upgrade it to an Rc. (you can consider all failing upgrades as equal)
  2. Obtain the pointer using Rc::into_raw and cache it as an integer you can hash.
  3. Turn the pointer back into an Rc using Rc::from_raw to avoid a memory leak from step 2 and immediately drop the resulting Rc.

Then you can save the pointer and use it to compute the hash.