pub trait ObjectPointer: Sized {
// Required methods
unsafe fn from_object_handle(handle: UObjectHandle) -> Self;
fn object_handle(&self) -> UObjectHandle;
}Expand description
A typed reference the engine passes as a UObject*: an object
(UObjectRef<T>) or a class (SubclassOf<T>, a UClass*). The generated
bindings convert through it, so the declared type decides which one.
Required Methods§
Sourceunsafe fn from_object_handle(handle: UObjectHandle) -> Self
unsafe fn from_object_handle(handle: UObjectHandle) -> Self
Wrap a pointer the engine returned.
§Safety
The handle must be null or an object the type admits: an instance of
T for UObjectRef<T>, T’s class or a subclass for SubclassOf<T>.
Sourcefn object_handle(&self) -> UObjectHandle
fn object_handle(&self) -> UObjectHandle
The pointer to hand to the engine.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".