pub unsafe trait InterfaceStruct:
Sized
+ 'static
+ Copy {
type Type: ObjectInterface;
// Provided method
fn interface_init(&mut self) { ... }
}
Expand description
Trait implemented by structs that implement a GTypeInterface
C class struct.
This must only be implemented on #[repr(C)]
structs and have an interface
that inherits from gobject_ffi::GTypeInterface
as the first field.
Required Associated Types§
Sourcetype Type: ObjectInterface
type Type: ObjectInterface
Corresponding object interface type for this class struct.
Provided Methods§
Sourcefn interface_init(&mut self)
fn interface_init(&mut self)
Set up default implementations for interface vfuncs.
This is automatically called during type initialization.
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.