Skip to content

Derive Default for rustified enums. #3308

@Ddystopia

Description

@Ddystopia

Hello, I have bindgen.derive_default(true), but rustified_enum types don't have a default impl.

Can we either:

  • Derive default if there is a variant that equals to 0
  • Derive default if a first variant that equals to 0
  • Derive default to be the first variant

I tried looking through the source code of bindgen, but I didn't manage to grasp where the changes should be made.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions