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 ( rc.rs - source ) > 0
-
upgrade ( rc.rs - source ) != 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).