pub trait ObjectType: FromGlibPtrBorrow<*mut Self::InstanceStructType>{
type InstanceStructType: Instance<Self> + 'static;
type ParentType: IsA<Object>;
type ImplType: ObjectImpl<Self>;
const NAME: &'static str;
// Required methods
fn class_init(token: &ClassInitToken, klass: &mut ClassStruct<Self>);
unsafe fn get_instance(&self) -> *mut Self::InstanceStructType;
// Provided methods
fn get_impl(&self) -> &Self::ImplType { ... }
unsafe fn get_class(&self) -> *const ClassStruct<Self> { ... }
}
Required Associated Constants§
Required Associated Types§
type InstanceStructType: Instance<Self> + 'static
type ParentType: IsA<Object>
type ImplType: ObjectImpl<Self>
Required Methods§
fn class_init(token: &ClassInitToken, klass: &mut ClassStruct<Self>)
unsafe fn get_instance(&self) -> *mut Self::InstanceStructType
Provided Methods§
fn get_impl(&self) -> &Self::ImplType
unsafe fn get_class(&self) -> *const ClassStruct<Self>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.