Struct panda_sys::TypeInfo[][src]

#[repr(C)]
pub struct TypeInfo {
Show 13 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_charparent: *const c_charinstance_size: size_tinstance_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_: boolclass_size: size_tclass_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_voidinterfaces: *mut InterfaceInfo

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.