Struct ClassStruct
#[repr(C)]pub struct ClassStruct<T>where
T: ObjectSubclass,{ /* private fields */ }Expand description
A basic class struct that does not store any additional data or virtual methods.
Methods from Deref<Target = Class<<T as ObjectSubclass>::Type>>§
pub 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.
pub fn upcast_ref<U>(&self) -> &Class<U>
pub fn upcast_ref<U>(&self) -> &Class<U>
Casts this class to a reference to a parent type’s class.
pub fn upcast_ref_mut<U>(&mut self) -> &mut Class<U>
pub fn upcast_ref_mut<U>(&mut self) -> &mut Class<U>
Casts this class to a mutable reference to a parent type’s class.
pub fn downcast_ref<U>(&self) -> Option<&Class<U>>
pub fn downcast_ref<U>(&self) -> Option<&Class<U>>
Casts this class to a reference to a child type’s class or fails if this class is not implementing the child class.
pub fn downcast_ref_mut<U>(&mut self) -> Option<&mut Class<U>>
pub fn downcast_ref_mut<U>(&mut self) -> Option<&mut Class<U>>
Casts this class to a mutable reference to a child type’s class or fails if this class is not implementing the child class.
Trait Implementations§
§impl<T> ClassStruct for ClassStruct<T>where
T: ObjectSubclass,
impl<T> ClassStruct for ClassStruct<T>where
T: ObjectSubclass,
§fn class_init(&mut self)
fn class_init(&mut self)
Override the vfuncs of all parent types. Read more
§impl<T> Debug for ClassStruct<T>
impl<T> Debug for ClassStruct<T>
§impl<T> Deref for ClassStruct<T>where
T: ObjectSubclass,
impl<T> Deref for ClassStruct<T>where
T: ObjectSubclass,
§type Target = Class<<T as ObjectSubclass>::Type>
type Target = Class<<T as ObjectSubclass>::Type>
The resulting type after dereferencing.
§fn deref(&self) -> &<ClassStruct<T> as Deref>::Target
fn deref(&self) -> &<ClassStruct<T> as Deref>::Target
Dereferences the value.
§impl<T> DerefMut for ClassStruct<T>where
T: ObjectSubclass,
impl<T> DerefMut for ClassStruct<T>where
T: ObjectSubclass,
§fn deref_mut(&mut self) -> &mut <ClassStruct<T> as Deref>::Target
fn deref_mut(&mut self) -> &mut <ClassStruct<T> as Deref>::Target
Mutably dereferences the value.
Auto Trait Implementations§
impl<T> Freeze for ClassStruct<T>
impl<T> RefUnwindSafe for ClassStruct<T>
impl<T> Send for ClassStruct<T>
impl<T> Sync for ClassStruct<T>
impl<T> Unpin for ClassStruct<T>
impl<T> UnwindSafe for ClassStruct<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
§impl<T> CellAreaClassExt for Twhere
T: ClassStruct,
impl<T> CellAreaClassExt for Twhere
T: ClassStruct,
fn find_cell_property(&self, property_name: &str) -> Option<ParamSpec>
fn list_cell_properties(&self) -> Vec<ParamSpec>
§impl<T, U> CompositeTemplateCallbacksClass for Twhere
T: ClassStruct<Type = U> + WidgetClassExt,
U: ObjectSubclass<Class = T> + CompositeTemplateCallbacks,
impl<T, U> CompositeTemplateCallbacksClass for Twhere
T: ClassStruct<Type = U> + WidgetClassExt,
U: ObjectSubclass<Class = T> + CompositeTemplateCallbacks,
§fn bind_template_callbacks(&mut self)
fn bind_template_callbacks(&mut self)
Binds the template callbacks from the subclass type into the default
template scope for
self.§impl<T, U> CompositeTemplateClass for Twhere
T: ClassStruct<Type = U>,
U: ObjectSubclass<Class = T> + CompositeTemplate,
impl<T, U> CompositeTemplateClass for Twhere
T: ClassStruct<Type = U>,
U: ObjectSubclass<Class = T> + CompositeTemplate,
§fn bind_template(&mut self)
fn bind_template(&mut self)
Binds the template callbacks from this type into the default template
scope for
self.§impl<T, U, V> CompositeTemplateInstanceCallbacksClass for Twhere
T: ClassStruct<Type = U> + WidgetClassExt,
U: ObjectSubclass<Class = T, Type = V>,
V: CompositeTemplateCallbacks,
impl<T, U, V> CompositeTemplateInstanceCallbacksClass for Twhere
T: ClassStruct<Type = U> + WidgetClassExt,
U: ObjectSubclass<Class = T, Type = V>,
V: CompositeTemplateCallbacks,
§fn bind_template_instance_callbacks(&mut self)
fn bind_template_instance_callbacks(&mut self)
Binds the template callbacks from the instance type into the default
template scope for
self.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more