Skip to content

GodotConvert derive-macro and godot(transparent) with PhantomData #1563

Description

@ProphetOSpam

It should be possible to derive GodotConvert with godot(transparent) on structs that have PhantomData and generics.

For example:

#[derive(GodotConvert)]
#[godot(transparent)]
pub struct Id<T>(u32, PhantomData<T>);

This struct is basically a newtype around u32 with some extra rust typing, and so it makes sense that this should be representable in Godot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: registerRegister classes, functions and other symbols to GDScriptquality-of-lifeNo new functionality, but improves ergonomics/internals

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions