Trait enso_prelude::WeakRef[][src]

pub trait WeakRef: CloneRef {
    type StrongRef: StrongRef<WeakRef = Self>;
    fn upgrade(&self) -> Option<Self::StrongRef>;
}
Expand description

Abstraction for a weak reference like Weak or newtypes over it.

Associated Types

type StrongRef: StrongRef<WeakRef = Self>[src]

Upgraded reference type.

Required methods

fn upgrade(&self) -> Option<Self::StrongRef>[src]

Attempts to upgrade the weak referenc to a strong one, delaying dropping of the inner value if successful.

Implementors

impl<T: ?Sized> WeakRef for Weak<T>[src]

type StrongRef = Rc<T>

fn upgrade(&self) -> Option<Self::StrongRef>[src]