Struct panda_sys::TypeInfo [−][src]
#[repr(C)]pub struct TypeInfo {}Show fields
pub name: *const c_char, pub parent: *const c_char, pub instance_size: size_t, pub instance_init: Option<unsafe extern "C" fn(obj: *mut Object)>, pub instance_post_init: Option<unsafe extern "C" fn(obj: *mut Object)>, pub instance_finalize: Option<unsafe extern "C" fn(obj: *mut Object)>, pub abstract_: bool, pub class_size: size_t, pub class_init: Option<unsafe extern "C" fn(klass: *mut ObjectClass, data: *mut c_void)>, pub class_base_init: Option<unsafe extern "C" fn(klass: *mut ObjectClass, data: *mut c_void)>, pub class_finalize: Option<unsafe extern "C" fn(klass: *mut ObjectClass, data: *mut c_void)>, pub class_data: *mut c_void, pub interfaces: *mut InterfaceInfo,
Expand description
TypeInfo: @name: The name of the type. @parent: The name of the parent type. @instance_size: The size of the object (derivative of #Object). If @instance_size is 0, then the size of the object will be the size of the parent object. @instance_init: This function is called to initialize an object. The parent class will have already been initialized so the type is only responsible for initializing its own members. @instance_post_init: This function is called to finish initialization of an object, after all @instance_init functions were called. @instance_finalize: This function is called during object destruction. This is called before the parent @instance_finalize function has been called. An object should only free the members that are unique to its type in this function. @abstract: If this field is true, then the class is considered abstract and cannot be directly instantiated. @class_size: The size of the class object (derivative of #ObjectClass) for this object. If @class_size is 0, then the size of the class will be assumed to be the size of the parent class. This allows a type to avoid implementing an explicit class type if they are not adding additional virtual functions. @class_init: This function is called after all parent class initialization has occurred to allow a class to set its default virtual method pointers. This is also the function to use to override virtual methods from a parent class. @class_base_init: This function is called for all base classes after all parent class initialization has occurred, but before the class itself is initialized. This is the function to use to undo the effects of memcpy from the parent class to the descendants. @class_finalize: This function is called during class destruction and is meant to release and dynamic parameters allocated by @class_init. @class_data: Data to pass to the @class_init, @class_base_init and @class_finalize functions. This can be useful when building dynamic classes. @interfaces: The list of interfaces associated with this type. This should point to a static array that’s terminated with a zero filled element.
Fields
name: *const c_char
parent: *const c_char
instance_size: size_t
instance_init: Option<unsafe extern "C" fn(obj: *mut Object)>
instance_post_init: Option<unsafe extern "C" fn(obj: *mut Object)>
instance_finalize: Option<unsafe extern "C" fn(obj: *mut Object)>
abstract_: bool
class_size: size_t
class_init: Option<unsafe extern "C" fn(klass: *mut ObjectClass, data: *mut c_void)>
class_base_init: Option<unsafe extern "C" fn(klass: *mut ObjectClass, data: *mut c_void)>
class_finalize: Option<unsafe extern "C" fn(klass: *mut ObjectClass, data: *mut c_void)>
class_data: *mut c_void
interfaces: *mut InterfaceInfo
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for TypeInfo
impl UnwindSafe for TypeInfo
Blanket Implementations
Mutably borrows from an owned value. Read more