Struct glib::subclass::ObjectImplRef
source · pub struct ObjectImplRef<T: ObjectSubclass>(_);
Expand description
Reference-counted wrapper around an ObjectSubclass
reference.
This can be used for passing into closures as strong or weak reference without manually going from the implementation type to the instance type and back.
Implementations§
source§impl<T: ObjectSubclass> ObjectImplRef<T>
impl<T: ObjectSubclass> ObjectImplRef<T>
sourcepub fn downgrade(&self) -> ObjectImplWeakRef<T>
pub fn downgrade(&self) -> ObjectImplWeakRef<T>
Downgrade to a weak reference.
This can be upgraded to a strong reference again via ObjectImplWeakRef::upgrade
.
Trait Implementations§
source§impl<T: ObjectSubclass> Clone for ObjectImplRef<T>
impl<T: ObjectSubclass> Clone for ObjectImplRef<T>
source§impl<T: ObjectSubclass> Debug for ObjectImplRef<T>
impl<T: ObjectSubclass> Debug for ObjectImplRef<T>
source§impl<T: ObjectSubclass> Deref for ObjectImplRef<T>
impl<T: ObjectSubclass> Deref for ObjectImplRef<T>
source§impl<T: ObjectSubclass> Downgrade for ObjectImplRef<T>
impl<T: ObjectSubclass> Downgrade for ObjectImplRef<T>
source§impl<T: ObjectSubclass> Hash for ObjectImplRef<T>
impl<T: ObjectSubclass> Hash for ObjectImplRef<T>
source§impl<T: ObjectSubclass> Ord for ObjectImplRef<T>
impl<T: ObjectSubclass> Ord for ObjectImplRef<T>
source§impl<T: ObjectSubclass, OT: ObjectType> PartialEq<OT> for ObjectImplRef<T>where
T::Type: PartialEq<OT>,
impl<T: ObjectSubclass, OT: ObjectType> PartialEq<OT> for ObjectImplRef<T>where T::Type: PartialEq<OT>,
source§impl<T: ObjectSubclass> PartialEq<ObjectImplRef<T>> for ObjectImplRef<T>
impl<T: ObjectSubclass> PartialEq<ObjectImplRef<T>> for ObjectImplRef<T>
source§impl<T: ObjectSubclass, OT: ObjectType> PartialOrd<OT> for ObjectImplRef<T>where
T::Type: PartialOrd<OT>,
impl<T: ObjectSubclass, OT: ObjectType> PartialOrd<OT> for ObjectImplRef<T>where T::Type: PartialOrd<OT>,
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl<T: ObjectSubclass> PartialOrd<ObjectImplRef<T>> for ObjectImplRef<T>
impl<T: ObjectSubclass> PartialOrd<ObjectImplRef<T>> for ObjectImplRef<T>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more