Trait ObjectType

Source
pub trait ObjectType: FromGlibPtrBorrow<*mut Self::InstanceStructType>
where Self: IsA<Object> + Sized + 'static, Self::InstanceStructType: Instance<Self>,
{ 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§

Source

const NAME: &'static str

Required Associated Types§

Required Methods§

Source

fn class_init(token: &ClassInitToken, klass: &mut ClassStruct<Self>)

Source

unsafe fn get_instance(&self) -> *mut Self::InstanceStructType

Provided Methods§

Source

fn get_impl(&self) -> &Self::ImplType

Source

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.

Implementors§