Trait GodotType
pub trait GodotType:
Sized
+ GodotConvert<Via = Self>
+ 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:
i64
implementsGodotType
, since it can be directly represented by Godot’sint
type.- But
VariantType
does 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", so this trait is not object safe.