pub struct ObjectImplRef<T: ObjectSubclass>(/* private fields */);
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>
impl<T: ObjectSubclass, OT: ObjectType> PartialEq<OT> for ObjectImplRef<T>
Source§impl<T: ObjectSubclass> PartialEq for ObjectImplRef<T>
impl<T: ObjectSubclass> PartialEq 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>,
Source§impl<T: ObjectSubclass> PartialOrd for ObjectImplRef<T>
impl<T: ObjectSubclass> PartialOrd for ObjectImplRef<T>
impl<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> Freeze for ObjectImplRef<T>
impl<T> RefUnwindSafe for ObjectImplRef<T>
impl<T> Unpin for ObjectImplRef<T>
impl<T> UnwindSafe for ObjectImplRef<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more