Trait glib::clone::Downgrade

source ·
pub trait Downgrade
where Self: Sized, Self::Weak: Upgrade,
{ type Weak; // Required method fn downgrade(&self) -> Self::Weak; }
Expand description

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

Required Associated Types§

source

type Weak

Weak reference type.

Required Methods§

source

fn downgrade(&self) -> Self::Weak

Downgrade to a weak reference.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T> Downgrade for Rc<T>

§

type Weak = Weak<T>

source§

fn downgrade(&self) -> Self::Weak

source§

impl<T> Downgrade for Arc<T>

§

type Weak = Weak<T>

source§

fn downgrade(&self) -> Self::Weak

source§

impl<T> Downgrade for PhantomData<T>

§

type Weak = PhantomData<T>

source§

fn downgrade(&self) -> Self::Weak

source§

impl<T: Downgrade> Downgrade for &T

§

type Weak = <T as Downgrade>::Weak

source§

fn downgrade(&self) -> Self::Weak

Implementors§