Skip to main content

is_instance_of

Function is_instance_of 

Source
pub fn is_instance_of<Target: ObjectCore>(object_type_index: i32) -> bool
Expand description

Whether the runtime type index of an object is Target or one of its subtypes, by walking the registered type hierarchy.

Use it in the strict check of a reference type implemented by hand; the casts of ObjectRefCore call it already. An index in the object range must be registered.