Trait Export

Source
pub trait Export: Var {
    // Provided method
    fn export_hint() -> PropertyHintInfo { ... }
}
Expand description

Trait implemented for types that can be used as #[export] fields.

Export is only implemented for objects Gd<T> if either T: Inherits<Node> or T: Inherits<Resource>, just like GDScript. This means you cannot use #[export] with Gd<RefCounted>, for example.

For enums, this trait can be derived using the #[derive(Export)] macro.

Provided Methods§

Source

fn export_hint() -> PropertyHintInfo

The export info to use for an exported field of this type, if no other export info is specified.

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§

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<T> Export for Option<T>
where T: Export, Option<T>: Var,

Implementors§