Trait zng_var::AnyWeakVar
source · pub trait AnyWeakVar:
Any
+ Send
+ Sync
+ Sealed {
// Required methods
fn clone_any(&self) -> BoxedAnyWeakVar;
fn as_any(&self) -> &dyn Any;
fn strong_count(&self) -> usize;
fn weak_count(&self) -> usize;
fn upgrade_any(&self) -> Option<BoxedAnyVar>;
}
Expand description
Represents a weak reference to an AnyVar
.
Required Methods§
sourcefn clone_any(&self) -> BoxedAnyWeakVar
fn clone_any(&self) -> BoxedAnyWeakVar
Clone the weak reference.
sourcefn strong_count(&self) -> usize
fn strong_count(&self) -> usize
Gets the number of strong references to the variable.
This is the same as AnyVar::strong_count
.
sourcefn weak_count(&self) -> usize
fn weak_count(&self) -> usize
Gets the number of weak references to the variable.
This is the same as AnyVar::weak_count
.
sourcefn upgrade_any(&self) -> Option<BoxedAnyVar>
fn upgrade_any(&self) -> Option<BoxedAnyVar>
Upgrade to a strong AnyVar
clone.
Returns None
if the strong_count
is zero.