Trait ApiParam
pub trait ApiParam: GodotType {
// Required method
fn owned_to_arg<'v>(self) -> Self::Arg<'v>;
}
Expand description
Implemented for all parameter types T
that are allowed to receive impl AsArg<T>
.
Required Methods§
fn owned_to_arg<'v>(self) -> Self::Arg<'v>
fn owned_to_arg<'v>(self) -> Self::Arg<'v>
Converts an owned value to the canonical argument type, which can be passed to impl AsArg<T>
.
Useful in generic contexts where only a value is available, and one doesn’t want to dispatch between value/reference.
You should not rely on the exact return type, as it may change in future versions; treat it like impl AsArg<Self>
.
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.