Trait GodotType
pub trait GodotType:
Sized
+ GodotConvert<Via = Self>
+ Clone
+ Sealed
+ 'static { }Expand description
Type that is directly representable in the engine.
This trait cannot be implemented for custom user types; for those, GodotConvert exists instead.
A type implements GodotType when Godot has a direct, native representation for it. For instance:
i64implementsGodotType, since it can be directly represented by Godot’sinttype.- But
VariantTypedoes not implementGodotType. While it is an enum Godot uses, we have no native way to indicate to Godot that a value should be one of the variants ofVariantType.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".