glib::subclass::interface

Function register_interface

Source
pub fn register_interface<T: ObjectInterface>() -> Type
Expand description

Register a glib::Type ID for T::Class.

This must be called only once and will panic on a second call.

The object_interface! macro will create a type_() function around this, which will ensure that it’s only ever called once.