Trait InParamTuple

Source
pub trait InParamTuple: ParamTuple {
    // Required methods
    unsafe fn from_varcall_args(
        args_ptr: *const GDExtensionConstVariantPtr,
        call_ctx: &CallContext<'_>,
    ) -> Result<Self, CallError>;
    unsafe fn from_ptrcall_args(
        args_ptr: *const GDExtensionConstTypePtr,
        call_type: PtrcallType,
        call_ctx: &CallContext<'_>,
    ) -> Self;
    fn from_variant_array(array: &[&Variant]) -> Self;
}
Expand description

Represents a parameter list that is received from some external location (usually Godot).

As an example, this would be used for user-defined functions that will be called from Godot, however this is not used when calling a Godot function from Rust code.

Required Methods§

Source

unsafe fn from_varcall_args( args_ptr: *const GDExtensionConstVariantPtr, call_ctx: &CallContext<'_>, ) -> Result<Self, CallError>

Converts args_ptr to Self by first going through [Variant].

§Safety
  • args_ptr must be a pointer to an array of length Self::LEN
  • Each element of args_ptr must be reborrowable as a &Variant with a lifetime that lasts for the duration of the call.
Source

unsafe fn from_ptrcall_args( args_ptr: *const GDExtensionConstTypePtr, call_type: PtrcallType, call_ctx: &CallContext<'_>, ) -> Self

Converts args_ptr to Self directly.

§Safety
  • args_ptr must be a pointer to a valid array of length Self::LEN
  • each element of args_ptr must be of the same type as each element of Self
Source

fn from_variant_array(array: &[&Variant]) -> Self

Converts array to Self by calling from_variant on each argument.

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§

Source§

impl InParamTuple for ()

Source§

unsafe fn from_varcall_args( args_ptr: *const GDExtensionConstVariantPtr, call_ctx: &CallContext<'_>, ) -> Result<Self, CallError>

Source§

unsafe fn from_ptrcall_args( args_ptr: *const GDExtensionConstTypePtr, call_type: PtrcallType, call_ctx: &CallContext<'_>, ) -> Self

Source§

fn from_variant_array(array: &[&Variant]) -> Self

Source§

impl<P0> InParamTuple for (P0,)
where P0: FromGodot + Debug,

Source§

unsafe fn from_varcall_args( args_ptr: *const GDExtensionConstVariantPtr, call_ctx: &CallContext<'_>, ) -> Result<Self, CallError>

Source§

unsafe fn from_ptrcall_args( args_ptr: *const GDExtensionConstTypePtr, call_type: PtrcallType, call_ctx: &CallContext<'_>, ) -> Self

Source§

fn from_variant_array(array: &[&Variant]) -> Self

Source§

impl<P0, P1> InParamTuple for (P0, P1)
where P0: FromGodot + Debug, P1: FromGodot + Debug,

Source§

unsafe fn from_varcall_args( args_ptr: *const GDExtensionConstVariantPtr, call_ctx: &CallContext<'_>, ) -> Result<Self, CallError>

Source§

unsafe fn from_ptrcall_args( args_ptr: *const GDExtensionConstTypePtr, call_type: PtrcallType, call_ctx: &CallContext<'_>, ) -> Self

Source§

fn from_variant_array(array: &[&Variant]) -> Self

Source§

impl<P0, P1, P2> InParamTuple for (P0, P1, P2)
where P0: FromGodot + Debug, P1: FromGodot + Debug, P2: FromGodot + Debug,

Source§

unsafe fn from_varcall_args( args_ptr: *const GDExtensionConstVariantPtr, call_ctx: &CallContext<'_>, ) -> Result<Self, CallError>

Source§

unsafe fn from_ptrcall_args( args_ptr: *const GDExtensionConstTypePtr, call_type: PtrcallType, call_ctx: &CallContext<'_>, ) -> Self

Source§

fn from_variant_array(array: &[&Variant]) -> Self

Source§

impl<P0, P1, P2, P3> InParamTuple for (P0, P1, P2, P3)
where P0: FromGodot + Debug, P1: FromGodot + Debug, P2: FromGodot + Debug, P3: FromGodot + Debug,

Source§

unsafe fn from_varcall_args( args_ptr: *const GDExtensionConstVariantPtr, call_ctx: &CallContext<'_>, ) -> Result<Self, CallError>

Source§

unsafe fn from_ptrcall_args( args_ptr: *const GDExtensionConstTypePtr, call_type: PtrcallType, call_ctx: &CallContext<'_>, ) -> Self

Source§

fn from_variant_array(array: &[&Variant]) -> Self

Source§

impl<P0, P1, P2, P3, P4> InParamTuple for (P0, P1, P2, P3, P4)
where P0: FromGodot + Debug, P1: FromGodot + Debug, P2: FromGodot + Debug, P3: FromGodot + Debug, P4: FromGodot + Debug,

Source§

unsafe fn from_varcall_args( args_ptr: *const GDExtensionConstVariantPtr, call_ctx: &CallContext<'_>, ) -> Result<Self, CallError>

Source§

unsafe fn from_ptrcall_args( args_ptr: *const GDExtensionConstTypePtr, call_type: PtrcallType, call_ctx: &CallContext<'_>, ) -> Self

Source§

fn from_variant_array(array: &[&Variant]) -> Self

Source§

impl<P0, P1, P2, P3, P4, P5> InParamTuple for (P0, P1, P2, P3, P4, P5)
where P0: FromGodot + Debug, P1: FromGodot + Debug, P2: FromGodot + Debug, P3: FromGodot + Debug, P4: FromGodot + Debug, P5: FromGodot + Debug,

Source§

unsafe fn from_varcall_args( args_ptr: *const GDExtensionConstVariantPtr, call_ctx: &CallContext<'_>, ) -> Result<Self, CallError>

Source§

unsafe fn from_ptrcall_args( args_ptr: *const GDExtensionConstTypePtr, call_type: PtrcallType, call_ctx: &CallContext<'_>, ) -> Self

Source§

fn from_variant_array(array: &[&Variant]) -> Self

Source§

impl<P0, P1, P2, P3, P4, P5, P6> InParamTuple for (P0, P1, P2, P3, P4, P5, P6)
where P0: FromGodot + Debug, P1: FromGodot + Debug, P2: FromGodot + Debug, P3: FromGodot + Debug, P4: FromGodot + Debug, P5: FromGodot + Debug, P6: FromGodot + Debug,

Source§

unsafe fn from_varcall_args( args_ptr: *const GDExtensionConstVariantPtr, call_ctx: &CallContext<'_>, ) -> Result<Self, CallError>

Source§

unsafe fn from_ptrcall_args( args_ptr: *const GDExtensionConstTypePtr, call_type: PtrcallType, call_ctx: &CallContext<'_>, ) -> Self

Source§

fn from_variant_array(array: &[&Variant]) -> Self

Source§

impl<P0, P1, P2, P3, P4, P5, P6, P7> InParamTuple for (P0, P1, P2, P3, P4, P5, P6, P7)
where P0: FromGodot + Debug, P1: FromGodot + Debug, P2: FromGodot + Debug, P3: FromGodot + Debug, P4: FromGodot + Debug, P5: FromGodot + Debug, P6: FromGodot + Debug, P7: FromGodot + Debug,

Source§

unsafe fn from_varcall_args( args_ptr: *const GDExtensionConstVariantPtr, call_ctx: &CallContext<'_>, ) -> Result<Self, CallError>

Source§

unsafe fn from_ptrcall_args( args_ptr: *const GDExtensionConstTypePtr, call_type: PtrcallType, call_ctx: &CallContext<'_>, ) -> Self

Source§

fn from_variant_array(array: &[&Variant]) -> Self

Source§

impl<P0, P1, P2, P3, P4, P5, P6, P7, P8> InParamTuple for (P0, P1, P2, P3, P4, P5, P6, P7, P8)
where P0: FromGodot + Debug, P1: FromGodot + Debug, P2: FromGodot + Debug, P3: FromGodot + Debug, P4: FromGodot + Debug, P5: FromGodot + Debug, P6: FromGodot + Debug, P7: FromGodot + Debug, P8: FromGodot + Debug,

Source§

unsafe fn from_varcall_args( args_ptr: *const GDExtensionConstVariantPtr, call_ctx: &CallContext<'_>, ) -> Result<Self, CallError>

Source§

unsafe fn from_ptrcall_args( args_ptr: *const GDExtensionConstTypePtr, call_type: PtrcallType, call_ctx: &CallContext<'_>, ) -> Self

Source§

fn from_variant_array(array: &[&Variant]) -> Self

Source§

impl<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9> InParamTuple for (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9)
where P0: FromGodot + Debug, P1: FromGodot + Debug, P2: FromGodot + Debug, P3: FromGodot + Debug, P4: FromGodot + Debug, P5: FromGodot + Debug, P6: FromGodot + Debug, P7: FromGodot + Debug, P8: FromGodot + Debug, P9: FromGodot + Debug,

Source§

unsafe fn from_varcall_args( args_ptr: *const GDExtensionConstVariantPtr, call_ctx: &CallContext<'_>, ) -> Result<Self, CallError>

Source§

unsafe fn from_ptrcall_args( args_ptr: *const GDExtensionConstTypePtr, call_type: PtrcallType, call_ctx: &CallContext<'_>, ) -> Self

Source§

fn from_variant_array(array: &[&Variant]) -> Self

Source§

impl<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10> InParamTuple for (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10)
where P0: FromGodot + Debug, P1: FromGodot + Debug, P2: FromGodot + Debug, P3: FromGodot + Debug, P4: FromGodot + Debug, P5: FromGodot + Debug, P6: FromGodot + Debug, P7: FromGodot + Debug, P8: FromGodot + Debug, P9: FromGodot + Debug, P10: FromGodot + Debug,

Source§

unsafe fn from_varcall_args( args_ptr: *const GDExtensionConstVariantPtr, call_ctx: &CallContext<'_>, ) -> Result<Self, CallError>

Source§

unsafe fn from_ptrcall_args( args_ptr: *const GDExtensionConstTypePtr, call_type: PtrcallType, call_ctx: &CallContext<'_>, ) -> Self

Source§

fn from_variant_array(array: &[&Variant]) -> Self

Source§

impl<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11> InParamTuple for (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11)
where P0: FromGodot + Debug, P1: FromGodot + Debug, P2: FromGodot + Debug, P3: FromGodot + Debug, P4: FromGodot + Debug, P5: FromGodot + Debug, P6: FromGodot + Debug, P7: FromGodot + Debug, P8: FromGodot + Debug, P9: FromGodot + Debug, P10: FromGodot + Debug, P11: FromGodot + Debug,

Source§

unsafe fn from_varcall_args( args_ptr: *const GDExtensionConstVariantPtr, call_ctx: &CallContext<'_>, ) -> Result<Self, CallError>

Source§

unsafe fn from_ptrcall_args( args_ptr: *const GDExtensionConstTypePtr, call_type: PtrcallType, call_ctx: &CallContext<'_>, ) -> Self

Source§

fn from_variant_array(array: &[&Variant]) -> Self

Source§

impl<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12> InParamTuple for (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12)
where P0: FromGodot + Debug, P1: FromGodot + Debug, P2: FromGodot + Debug, P3: FromGodot + Debug, P4: FromGodot + Debug, P5: FromGodot + Debug, P6: FromGodot + Debug, P7: FromGodot + Debug, P8: FromGodot + Debug, P9: FromGodot + Debug, P10: FromGodot + Debug, P11: FromGodot + Debug, P12: FromGodot + Debug,

Source§

unsafe fn from_varcall_args( args_ptr: *const GDExtensionConstVariantPtr, call_ctx: &CallContext<'_>, ) -> Result<Self, CallError>

Source§

unsafe fn from_ptrcall_args( args_ptr: *const GDExtensionConstTypePtr, call_type: PtrcallType, call_ctx: &CallContext<'_>, ) -> Self

Source§

fn from_variant_array(array: &[&Variant]) -> Self

Source§

impl<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13> InParamTuple for (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13)
where P0: FromGodot + Debug, P1: FromGodot + Debug, P2: FromGodot + Debug, P3: FromGodot + Debug, P4: FromGodot + Debug, P5: FromGodot + Debug, P6: FromGodot + Debug, P7: FromGodot + Debug, P8: FromGodot + Debug, P9: FromGodot + Debug, P10: FromGodot + Debug, P11: FromGodot + Debug, P12: FromGodot + Debug, P13: FromGodot + Debug,

Source§

unsafe fn from_varcall_args( args_ptr: *const GDExtensionConstVariantPtr, call_ctx: &CallContext<'_>, ) -> Result<Self, CallError>

Source§

unsafe fn from_ptrcall_args( args_ptr: *const GDExtensionConstTypePtr, call_type: PtrcallType, call_ctx: &CallContext<'_>, ) -> Self

Source§

fn from_variant_array(array: &[&Variant]) -> Self

Implementors§