I have a
Weak<T>. I want to know if it points at a real object or a null. (i.e. get a bool).
The current options seem to be:
strong_count ( https://doc.rust-lang.org/src/alloc/rc.rs.html#1311-1317 ) > 0
upgrade ( https://doc.rust-lang.org/src/alloc/rc.rs.html#1295-1303 ) != None
As it turns out, need neither a ptr nor a count. I just want to know if it’s null or not. What is the cheapest way to do this (and what is the cost of the cheapest way).