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
sourceimpl<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
sourceimpl<T: ObjectSubclass> Clone for ObjectImplRef<T>
impl<T: ObjectSubclass> Clone for ObjectImplRef<T>
sourceimpl<T: ObjectSubclass> Debug for ObjectImplRef<T>
impl<T: ObjectSubclass> Debug for ObjectImplRef<T>
sourceimpl<T: ObjectSubclass> Deref for ObjectImplRef<T>
impl<T: ObjectSubclass> Deref for ObjectImplRef<T>
sourceimpl<T: ObjectSubclass> Downgrade for ObjectImplRef<T>
impl<T: ObjectSubclass> Downgrade for ObjectImplRef<T>
type Weak = ObjectImplWeakRef<T>
type Weak = ObjectImplWeakRef<T>
Weak reference type.
sourceimpl<T: ObjectSubclass> Hash for ObjectImplRef<T>
impl<T: ObjectSubclass> Hash for ObjectImplRef<T>
sourceimpl<T: ObjectSubclass> Ord for ObjectImplRef<T>
impl<T: ObjectSubclass> Ord for ObjectImplRef<T>
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<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>,
sourceimpl<T: ObjectSubclass> PartialEq<ObjectImplRef<T>> for ObjectImplRef<T>
impl<T: ObjectSubclass> PartialEq<ObjectImplRef<T>> for ObjectImplRef<T>
sourceimpl<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>,
sourcefn partial_cmp(&self, other: &OT) -> Option<Ordering>
fn partial_cmp(&self, other: &OT) -> Option<Ordering>
1.0.0 · sourcefn 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 moresourceimpl<T: ObjectSubclass> PartialOrd<ObjectImplRef<T>> for ObjectImplRef<T>
impl<T: ObjectSubclass> PartialOrd<ObjectImplRef<T>> for ObjectImplRef<T>
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
1.0.0 · sourcefn 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 moreimpl<T: ObjectSubclass> Eq for ObjectImplRef<T>
impl<T: ObjectSubclass + Send + Sync> Send for ObjectImplRef<T>
impl<T: ObjectSubclass + Send + Sync> Sync for ObjectImplRef<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for ObjectImplRef<T>where
<T as ObjectSubclass>::Type: RefUnwindSafe,
impl<T> Unpin for ObjectImplRef<T>where
<T as ObjectSubclass>::Type: Unpin,
impl<T> UnwindSafe for ObjectImplRef<T>where
<T as ObjectSubclass>::Type: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more