gdk_pixbuf::subclass::prelude

Trait InterfaceStruct

Source
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§

Source

type Type: ObjectInterface

Corresponding object interface type for this class struct.

Provided Methods§

Source

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.

Implementors§