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§
Sourcefn with_variants<F, R>(self, f: F) -> Rwhere
F: FnOnce(&[Variant]) -> R,
fn with_variants<F, R>(self, f: F) -> Rwhere
F: FnOnce(&[Variant]) -> R,
Call f
on the tuple self
by first converting self
to an array of [Variant
]s.
Sourcefn to_variant_array(&self) -> Vec<Variant>
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.