Skip to content

Allow automatically derived Show for enums to be just the field name #18669

Closed
@mitsuhiko

Description

@mitsuhiko

When working with enums for error reporting it would be super useful if the default implementation of Show for enums could be customized so that you can skip the contained data. For instance if you have a MyError(SomeOtherError) it is interesting to just get MyError instead of MyError(SomeOtherError { foo: 42 }) or whatever is contained in there.

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