Trait glib::clone::Downgrade

source ·
pub trait Downgradewhere
    Self: Sized,{
    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.

Implementations on Foreign Types§

source§

impl<T> Downgrade for PhantomData<T>

§

type Weak = PhantomData<T>

source§

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

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> Downgrade for &T

§

type Weak = <T as Downgrade>::Weak

source§

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

Implementors§