pub trait ObjectSubclassExt: ObjectSubclass {
    fn instance(&self) -> BorrowedObject<'_, Self::Type>;
    fn from_instance(obj: &Self::Type) -> &Self;
    fn obj(&self) -> BorrowedObject<'_, Self::Type>;
    fn from_obj(obj: &Self::Type) -> &Self;
    fn ref_counted(&self) -> ObjectImplRef<Self>;
    fn instance_data<U: Any + Send + Sync + 'static>(
        &self,
        type_: Type
    ) -> Option<&U>; }
Expand description

Extension methods for all ObjectSubclass impls.

Required Methods§

Returns the corresponding object instance.

Returns the implementation from an instance.

Returns the corresponding object instance.

Shorter alias for instance().

Returns the implementation from an instance.

Shorter alias for from_instance().

Returns a new reference-counted wrapper around self.

Returns a pointer to the instance implementation specific data.

This is used for the subclassing infrastructure to store additional instance data.

Implementors§