Trait godot_core::meta::ArrayElement
source · pub trait ArrayElement: GodotType { }
Expand description
Marker trait to identify types that can be stored in [Array<T>
][crate::builtin::Array].
The types for which this trait is implemented, overlap mostly with GodotType
.
This is done consistently what GDScript allows inside Array[T]
.
Notable differences are:
- Only
VariantArray
, notArray<T>
is allowed (typed arrays cannot be nested). Option
is only supported forOption<Gd<T>>
, but not e.g.Option<i32>
.
Object Safety§
This trait is not object safe.