gdk_pixbuf::subclass::prelude

Trait InstanceStruct

Source
pub unsafe trait InstanceStruct: Sized + 'static {
    type Type: ObjectSubclass;

    // Provided method
    fn instance_init(&mut self) { ... }
}
Expand description

Trait implemented by structs that implement a GObject C instance struct.

The struct must be #[repr(C)] and have the parent type’s instance struct as the first field.

See basic::InstanceStruct for a basic implementation of this that can be used most of the time and should only not be used if additional fields are required in the instance struct.

Required Associated Types§

Source

type Type: ObjectSubclass

Corresponding object subclass type for this instance struct.

Provided Methods§

Source

fn instance_init(&mut self)

Instance specific initialization.

This is automatically called during instance initialization and must call instance_init() of the parent class.

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§