Trait gdk_pixbuf::subclass::prelude::ObjectSubclassExt
source · pub trait ObjectSubclassExt: ObjectSubclass {
// Required methods
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>(&self, type_: Type) -> Option<&U>
where U: Any + Send + Sync + 'static;
}
Expand description
Extension methods for all ObjectSubclass
impls.
Required Methods§
sourcefn instance(&self) -> BorrowedObject<'_, Self::Type>
👎Deprecated: Use obj() instead
fn instance(&self) -> BorrowedObject<'_, Self::Type>
Returns the corresponding object instance.
sourcefn from_instance(obj: &Self::Type) -> &Self
👎Deprecated: Use from_obj() instead
fn from_instance(obj: &Self::Type) -> &Self
Returns the implementation from an instance.
sourcefn obj(&self) -> BorrowedObject<'_, Self::Type>
fn obj(&self) -> BorrowedObject<'_, Self::Type>
Returns the corresponding object instance.
Shorter alias for instance()
.
sourcefn from_obj(obj: &Self::Type) -> &Self
fn from_obj(obj: &Self::Type) -> &Self
Returns the implementation from an instance.
Shorter alias for from_instance()
.
sourcefn ref_counted(&self) -> ObjectImplRef<Self>
fn ref_counted(&self) -> ObjectImplRef<Self>
Returns a new reference-counted wrapper around self
.
Object Safety§
This trait is not object safe.