Trait OutParamTuple

pub trait OutParamTuple: ParamTuple {
    // Required methods
    fn with_variants<F, R>(self, f: F) -> R
       where F: FnOnce(&[Variant]) -> R;
    fn to_variant_array(&self) -> Vec<Variant>;
}
Expand description

Represents a parameter list that is used to call some external code.

As an example, this would be used to call Godot functions through FFI, however this is not used when Godot calls a user-defined function.

Required Methods§

fn with_variants<F, R>(self, f: F) -> R
where F: FnOnce(&[Variant]) -> R,

Call f on the tuple self by first converting self to an array of Variants.

fn to_variant_array(&self) -> Vec<Variant>

Converts array to Self by calling to_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§

§

impl OutParamTuple for ()

§

fn with_variants<F, R>(self, f: F) -> R
where F: FnOnce(&[Variant]) -> R,

§

fn to_variant_array(&self) -> Vec<Variant>

§

impl<P0> OutParamTuple for (P0,)
where P0: ToGodot + Debug,

§

fn with_variants<F, R>(self, f: F) -> R
where F: FnOnce(&[Variant]) -> R,

§

fn to_variant_array(&self) -> Vec<Variant>

§

impl<P0, P1> OutParamTuple for (P0, P1)
where P0: ToGodot + Debug, P1: ToGodot + Debug,

§

fn with_variants<F, R>(self, f: F) -> R
where F: FnOnce(&[Variant]) -> R,

§

fn to_variant_array(&self) -> Vec<Variant>

§

impl<P0, P1, P2> OutParamTuple for (P0, P1, P2)
where P0: ToGodot + Debug, P1: ToGodot + Debug, P2: ToGodot + Debug,

§

fn with_variants<F, R>(self, f: F) -> R
where F: FnOnce(&[Variant]) -> R,

§

fn to_variant_array(&self) -> Vec<Variant>

§

impl<P0, P1, P2, P3> OutParamTuple for (P0, P1, P2, P3)
where P0: ToGodot + Debug, P1: ToGodot + Debug, P2: ToGodot + Debug, P3: ToGodot + Debug,

§

fn with_variants<F, R>(self, f: F) -> R
where F: FnOnce(&[Variant]) -> R,

§

fn to_variant_array(&self) -> Vec<Variant>

§

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

§

fn with_variants<F, R>(self, f: F) -> R
where F: FnOnce(&[Variant]) -> R,

§

fn to_variant_array(&self) -> Vec<Variant>

§

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

§

fn with_variants<F, R>(self, f: F) -> R
where F: FnOnce(&[Variant]) -> R,

§

fn to_variant_array(&self) -> Vec<Variant>

§

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

§

fn with_variants<F, R>(self, f: F) -> R
where F: FnOnce(&[Variant]) -> R,

§

fn to_variant_array(&self) -> Vec<Variant>

§

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

§

fn with_variants<F, R>(self, f: F) -> R
where F: FnOnce(&[Variant]) -> R,

§

fn to_variant_array(&self) -> Vec<Variant>

§

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

§

fn with_variants<F, R>(self, f: F) -> R
where F: FnOnce(&[Variant]) -> R,

§

fn to_variant_array(&self) -> Vec<Variant>

§

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

§

fn with_variants<F, R>(self, f: F) -> R
where F: FnOnce(&[Variant]) -> R,

§

fn to_variant_array(&self) -> Vec<Variant>

§

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

§

fn with_variants<F, R>(self, f: F) -> R
where F: FnOnce(&[Variant]) -> R,

§

fn to_variant_array(&self) -> Vec<Variant>

§

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

§

fn with_variants<F, R>(self, f: F) -> R
where F: FnOnce(&[Variant]) -> R,

§

fn to_variant_array(&self) -> Vec<Variant>

§

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

§

fn with_variants<F, R>(self, f: F) -> R
where F: FnOnce(&[Variant]) -> R,

§

fn to_variant_array(&self) -> Vec<Variant>

§

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

§

fn with_variants<F, R>(self, f: F) -> R
where F: FnOnce(&[Variant]) -> R,

§

fn to_variant_array(&self) -> Vec<Variant>

Implementors§