Skip to content

Write Display and Debug traits for uniffi Records and Enums #879

@thunderbiscuit

Description

@thunderbiscuit

This is now available as of uniffi-rs 0.30.0.

Note that it doesn't work on pure enums, and only on enums that hold data (the ones that get transformed into sealed classes in Kotlin).

Notes:

  • Both Debug and Display will generate the toString() method in Kotlin, with the Display taking precedence over Debug if it exists.
  • The Debug will generate the __repr__ and the Display will generate __str__ methods in Python.
  • Swift? I need to test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions