Trait Export

Source
pub trait Export: ToVariant {
    type Hint;

    // Required method
    fn export_info(hint: Option<Self::Hint>) -> ExportInfo;
}
Expand description

Trait for exportable types.

Required Associated Types§

Source

type Hint

A type-specific hint type that is valid for the type being exported.

If this type shows up as NoHint, a private, uninhabitable type indicating that there are no hints available for the time being, users must use None for properties of this type. This ensures that it will not be a breaking change to add a hint for the type later, since it supports no operations and cannot be named directly in user code.

Required Methods§

Source

fn export_info(hint: Option<Self::Hint>) -> ExportInfo

Returns ExportInfo given an optional typed hint.

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 Export for bool

Source§

type Hint = NoHint

Source§

fn export_info(_hint: Option<Self::Hint>) -> ExportInfo

Source§

impl Export for f32

Source§

impl Export for f64

Source§

impl Export for i8

Source§

impl Export for i16

Source§

impl Export for i32

Source§

impl Export for i64

Source§

impl Export for u8

Source§

impl Export for u16

Source§

impl Export for u32

Source§

impl Export for u64

Source§

impl Export for String

Source§

impl<K, V> Export for HashMap<K, V>

Source§

type Hint = NoHint

Source§

fn export_info(_hint: Option<Self::Hint>) -> ExportInfo

Source§

impl<T> Export for Option<T>
where T: Export,

Source§

impl<T> Export for Vec<T>
where T: ToVariant,

Source§

type Hint = NoHint

Source§

fn export_info(_hint: Option<Self::Hint>) -> ExportInfo

Source§

impl<T> Export for HashSet<T>
where T: ToVariant,

Source§

type Hint = NoHint

Source§

fn export_info(_hint: Option<Self::Hint>) -> ExportInfo

Implementors§

Source§

impl Export for Aabb

Source§

type Hint = NoHint

Source§

impl Export for Basis

Source§

type Hint = NoHint

Source§

impl Export for Color

Source§

impl Export for Dictionary

Source§

type Hint = NoHint

Source§

impl Export for GodotString

Source§

impl Export for NodePath

Source§

type Hint = NoHint

Source§

impl Export for Plane

Source§

type Hint = NoHint

Source§

impl Export for PoolArray<f32>

Source§

type Hint = NoHint

Source§

impl Export for PoolArray<i32>

Source§

type Hint = NoHint

Source§

impl Export for PoolArray<u8>

Source§

type Hint = NoHint

Source§

impl Export for PoolArray<Color>

Source§

type Hint = NoHint

Source§

impl Export for PoolArray<GodotString>

Source§

type Hint = NoHint

Source§

impl Export for PoolArray<Vector2>

Source§

type Hint = NoHint

Source§

impl Export for PoolArray<Vector3>

Source§

type Hint = NoHint

Source§

impl Export for Quat

Source§

type Hint = NoHint

Source§

impl Export for Rect2

Source§

type Hint = NoHint

Source§

impl Export for Rid

Source§

type Hint = NoHint

Source§

impl Export for Transform2D

Source§

type Hint = NoHint

Source§

impl Export for Transform

Source§

type Hint = NoHint

Source§

impl Export for VariantArray<Shared>

Source§

impl Export for Vector2

Source§

type Hint = NoHint

Source§

impl Export for Vector3

Source§

type Hint = NoHint

Source§

impl<T> Export for Instance<T, Shared>

Source§

type Hint = NoHint

Source§

impl<T> Export for Ref<T, Shared>
where T: GodotObject,

Source§

type Hint = NoHint