Trait zng::var::AnyWeakVar

source ·
pub trait AnyWeakVar:
    Any
    + Send
    + Sync
    + Sealed {
    // Required methods
    fn clone_any(&self) -> Box<dyn AnyWeakVar>;
    fn as_any(&self) -> &(dyn Any + 'static);
    fn strong_count(&self) -> usize;
    fn weak_count(&self) -> usize;
    fn upgrade_any(&self) -> Option<Box<dyn AnyVar>>;
}
Expand description

Represents a weak reference to an AnyVar.

Required Methods§

source

fn clone_any(&self) -> Box<dyn AnyWeakVar>

Clone the weak reference.

source

fn as_any(&self) -> &(dyn Any + 'static)

Access to dyn Any methods.

source

fn strong_count(&self) -> usize

Gets the number of strong references to the variable.

This is the same as AnyVar::strong_count.

source

fn weak_count(&self) -> usize

Gets the number of weak references to the variable.

This is the same as AnyVar::weak_count.

source

fn upgrade_any(&self) -> Option<Box<dyn AnyVar>>

Upgrade to a strong AnyVar clone.

Returns None if the strong_count is zero.

Trait Implementations§

source§

impl Clone for Box<dyn AnyWeakVar>

source§

fn clone(&self) -> Box<dyn AnyWeakVar>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Implementors§

source§

impl<I, O, S> AnyWeakVar for WeakMapRef<I, O, S>
where I: VarValue, O: VarValue, S: WeakVar<I>,

source§

impl<I, O, S> AnyWeakVar for WeakMapRefBidi<I, O, S>
where I: VarValue, O: VarValue, S: WeakVar<I>,

source§

impl<T> AnyWeakVar for WeakMergeVar<T>
where T: VarValue,

source§

impl<T> AnyWeakVar for WeakArcVar<T>
where T: VarValue,

source§

impl<T> AnyWeakVar for WeakContextualizedVar<T>
where T: VarValue,

source§

impl<T> AnyWeakVar for WeakWhenVar<T>
where T: VarValue,

source§

impl<T, S> AnyWeakVar for WeakCowVar<T, S>
where T: VarValue, S: Var<T>,

source§

impl<T, V> AnyWeakVar for WeakFlatMapVar<T, V>
where T: VarValue, V: Var<T>,

source§

impl<T, V> AnyWeakVar for WeakReadOnlyVar<T, V>
where T: VarValue, V: WeakVar<T>,