Trait glib::clone::Upgrade

source ·
pub trait Upgradewhere
    Self: Sized,{
    type Strong;

    // Required method
    fn upgrade(&self) -> Option<Self::Strong>;
}
Expand description

Trait for generalizing upgrading a weak reference to a strong reference.

Required Associated Types§

source

type Strong

Strong reference type.

Required Methods§

source

fn upgrade(&self) -> Option<Self::Strong>

Try upgrading a weak reference to a strong reference.

Implementations on Foreign Types§

source§

impl<T> Upgrade for Weak<T>

§

type Strong = Rc<T>

source§

fn upgrade(&self) -> Option<Self::Strong>

source§

impl<T> Upgrade for PhantomData<T>

§

type Strong = PhantomData<T>

source§

fn upgrade(&self) -> Option<Self::Strong>

source§

impl<T> Upgrade for Weak<T>

§

type Strong = Arc<T>

source§

fn upgrade(&self) -> Option<Self::Strong>

Implementors§