Trait BuiltinExport
pub trait BuiltinExport { }
Expand description
Marker trait to identify GodotType
s that can be directly used with an #[export]
.
Implemented pretty much for all the GodotTypes
that are not GodotClass
.
Provides a few blanket implementations and, by itself, has no implications
for the Var
or Export
traits.
Some Godot Types which are inherently non-nullable (e.g., Gd<T>
),
might have their value set to null by the editor. Additionally, Godot must generate
initial, default value for such properties, causing memory leaks.
Non-algebraic types that don’t implement BuiltinExport
shouldn’t be used directly as an #[export]
and must be handled using associated algebraic types, such as:
Option<T>
, which represents optional value that can be null when used.OnEditor<T>
, which represents value that must not be null when used.