Trait godot::meta::ArrayElement

pub trait ArrayElement: GodotType { }
Expand description

Marker trait to identify types that can be stored in Array<T>.

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, not Array<T> is allowed (typed arrays cannot be nested).
  • Option is only supported for Option<Gd<T>>, but not e.g. Option<i32>.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

§

impl ArrayElement for bool

§

impl ArrayElement for f32

§

impl ArrayElement for f64

§

impl ArrayElement for i8

§

impl ArrayElement for i16

§

impl ArrayElement for i32

§

impl ArrayElement for i64

§

impl ArrayElement for u8

§

impl ArrayElement for u16

§

impl ArrayElement for u32

§

impl<T> ArrayElement for Option<Gd<T>>
where T: GodotClass,

Implementors§