pub struct ClassRef<'a, T: IsClass>(/* private fields */);
Expand description
Reference to the class struct of type T
.
Methods from Deref<Target = Class<T>>§
sourcepub fn type_(&self) -> Type
pub fn type_(&self) -> Type
Get the type id for this class.
This is not equivalent to T::static_type()
but is the type of the subclass of T
where
this class belongs to.
sourcepub fn upcast_ref<U: IsClass>(&self) -> &Class<U>where
T: IsA<U>,
pub fn upcast_ref<U: IsClass>(&self) -> &Class<U>where
T: IsA<U>,
Casts this class to a reference to a parent type’s class.
Trait Implementations§
impl<'a, T: IsClass> Send for ClassRef<'a, T>
impl<'a, T: IsClass> Sync for ClassRef<'a, T>
Auto Trait Implementations§
impl<'a, T> Freeze for ClassRef<'a, T>where
T: ObjectType + IntoGlibPtr<*mut <T as ObjectType>::GlibType> + for<'a> ToGlibPtr<'a, *mut <T as ObjectType>::GlibType> + FromValueOptional<'static> + FromValueOptionalSealed<'static> + ToValueOptional + ToValue + ValueType + for<'a> FromValue<'a> + Hash + Ord + PartialOrd + Eq + PartialEq + Clone + Debug + StaticType + Into<ObjectRef> + UnsafeFrom<ObjectRef> + 'static,
impl<'a, T> RefUnwindSafe for ClassRef<'a, T>where
T: ObjectType + IntoGlibPtr<*mut <T as ObjectType>::GlibType> + for<'a> ToGlibPtr<'a, *mut <T as ObjectType>::GlibType> + FromValueOptional<'static> + FromValueOptionalSealed<'static> + ToValueOptional + ToValue + ValueType + for<'a> FromValue<'a> + Hash + Ord + PartialOrd + Eq + PartialEq + Clone + Debug + StaticType + Into<ObjectRef> + UnsafeFrom<ObjectRef> + 'static,
<T as ObjectType>::GlibClassType: RefUnwindSafe,
impl<'a, T> Unpin for ClassRef<'a, T>where
T: ObjectType + IntoGlibPtr<*mut <T as ObjectType>::GlibType> + for<'a> ToGlibPtr<'a, *mut <T as ObjectType>::GlibType> + FromValueOptional<'static> + FromValueOptionalSealed<'static> + ToValueOptional + ToValue + ValueType + for<'a> FromValue<'a> + Hash + Ord + PartialOrd + Eq + PartialEq + Clone + Debug + StaticType + Into<ObjectRef> + UnsafeFrom<ObjectRef> + 'static,
impl<'a, T> UnwindSafe for ClassRef<'a, T>where
T: ObjectType + IntoGlibPtr<*mut <T as ObjectType>::GlibType> + for<'a> ToGlibPtr<'a, *mut <T as ObjectType>::GlibType> + FromValueOptional<'static> + FromValueOptionalSealed<'static> + ToValueOptional + ToValue + ValueType + for<'a> FromValue<'a> + Hash + Ord + PartialOrd + Eq + PartialEq + Clone + Debug + StaticType + Into<ObjectRef> + UnsafeFrom<ObjectRef> + 'static,
<T as ObjectType>::GlibClassType: RefUnwindSafe,
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