Trait godot::obj::AsObjectArg
pub trait AsObjectArg<T>{ }
Expand description
Objects that can be passed as arguments to Godot engine functions.
This trait is implemented for the following types:
Gd<T>
and&Gd<T>
, to pass objects. Subclasses ofT
are explicitly supported.Option<Gd<T>>
andOption<&Gd<T>>
, to pass optional objects.None
is mapped to a null argument.Gd::null_arg()
, to passnull
arguments without usingOption
.
§Nullability
The GDExtension API does not inform about nullability of its function parameters. It is up to you to verify that the arguments you pass
are only null when this is allowed. Doing this wrong should be safe, but can lead to the function call failing.