1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// Marker traits for UE reflection types. Codegen generates impls for all
// exported UClasses, UStructs, and UEnums.
use ;
use crateRustealResult;
/// Implemented by codegen for every exported UClass.
///
/// Provides the static UClass handle needed for cast checks and reflection
/// queries. The handle is typically cached in a `OnceLock` on first access.
/// Implemented by codegen for every exported UScriptStruct.
/// Implemented by codegen for every exported UEnum.
/// Declares the immediate UE parent class for codegen-exported classes.
///
/// Enables blanket `Deref` impls on `UObjectRef<T>`, `Checked<T>`, and
/// `Pinned<T>` so inherited methods resolve automatically through the
/// Deref chain instead of being flattened into each child's Ext trait.
///
/// Codegen generates `impl HasParent for Pawn { type Parent = Actor; }` etc.
/// Root classes (e.g., `UObject`) do NOT implement this trait.
/// Trait for types that hold a UObject handle and can validate it.
///
/// Both `UObjectRef<T>` and `Pinned<T>` implement this, enabling fallible
/// validity checks. For infallible access, use [`ValidHandle`] instead.
/// Trait for types that have been pre-validated and can provide a handle
/// without fallibility. `Checked<T>` and `Pinned<T>` implement this.
///
/// Codegen extension traits use this as a supertrait so that methods
/// return `T` directly instead of `RustealResult<T>`.