Trait gdnative_core::core_types::variant::OwnedToVariant[][src]

pub trait OwnedToVariant {
    fn owned_to_variant(self) -> Variant;
}

Types that can only be safely converted to a Variant as owned values. Such types cannot implement ToVariant in general, but can still be passed to API methods as arguments, or used as return values. Notably, this includes Unique arrays, dictionaries, and references to Godot objects and instances.

This has a blanket implementation for all types that have ToVariant. As such, users should only derive or implement OwnedToVariant when ToVariant is not applicable.

Deriving OwnedToVariant

The derive macro behaves the same as ToVariant. See the documentation for the latter for a detailed explanation.

Required methods

Loading content...

Implementors

impl OwnedToVariant for Dictionary<Unique>[src]

impl OwnedToVariant for VariantArray<Unique>[src]

impl<T> OwnedToVariant for Instance<T, Unique> where
    T: NativeClass
[src]

impl<T: ToVariant> OwnedToVariant for T[src]

impl<T: GodotObject> OwnedToVariant for Ref<T, Unique>[src]

Loading content...