Trait glib::clone::Upgrade

source ·
pub trait Upgrade
where 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.

Object Safety§

This trait is not object safe.

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 Weak<T>

§

type Strong = Arc<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>

Implementors§