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>
impl<'a, T> RefUnwindSafe for ClassRef<'a, T>
impl<'a, T> Unpin for ClassRef<'a, T>
impl<'a, T> UnwindSafe for ClassRef<'a, 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