pub trait Object: HasVtable {
// Provided methods
fn dtor(&mut self) { ... }
fn destroy(&mut self) { ... }
fn create_ui(&self) { ... }
fn is_enable_instance(&self) -> bool { ... }
fn create_property(&self, props: *mut c_void) { ... }
fn get_dti(&self) -> *const c_void { ... }
}Expand description
Behaviour shared by every MT Framework object, backed by the class’s vtable.
This trait exposes the common virtual functions found at the start of every
MtObject vtable. It is implemented for concrete object types via
#[derive(Object)]; each method dispatches through the corresponding vtable
slot, so calling one runs the game’s own implementation for that object.
Provided Methods§
Sourcefn is_enable_instance(&self) -> bool
fn is_enable_instance(&self) -> bool
Returns whether the object is currently an enabled instance (vtable slot 3).
Sourcefn create_property(&self, props: *mut c_void)
fn create_property(&self, props: *mut c_void)
Populates props (an MtPropertyList) with the object’s reflected
properties (vtable slot 4).
Prefer the safe MtObject::get_properties wrapper, which builds and
returns the list for you.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".