godot::meta

Trait ParamType

pub trait ParamType:
    Sized
    + Sealed
    + 'static {
    // 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>

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.

Implementations on Foreign Types§

§

impl ParamType for bool

§

fn owned_to_arg<'v>(self) -> <bool as ParamType>::Arg<'v>

§

impl ParamType for f32

§

fn owned_to_arg<'v>(self) -> <f32 as ParamType>::Arg<'v>

§

impl ParamType for f64

§

fn owned_to_arg<'v>(self) -> <f64 as ParamType>::Arg<'v>

§

impl ParamType for i8

§

fn owned_to_arg<'v>(self) -> <i8 as ParamType>::Arg<'v>

§

impl ParamType for i16

§

fn owned_to_arg<'v>(self) -> <i16 as ParamType>::Arg<'v>

§

impl ParamType for i32

§

fn owned_to_arg<'v>(self) -> <i32 as ParamType>::Arg<'v>

§

impl ParamType for i64

§

fn owned_to_arg<'v>(self) -> <i64 as ParamType>::Arg<'v>

§

impl ParamType for u8

§

fn owned_to_arg<'v>(self) -> <u8 as ParamType>::Arg<'v>

§

impl ParamType for u16

§

fn owned_to_arg<'v>(self) -> <u16 as ParamType>::Arg<'v>

§

impl ParamType for u32

§

fn owned_to_arg<'v>(self) -> <u32 as ParamType>::Arg<'v>

§

impl<T> ParamType for Option<Gd<T>>
where T: GodotClass,

§

fn owned_to_arg<'v>(self) -> <Option<Gd<T>> as ParamType>::Arg<'v>

Implementors§