Skip to content

No way to override trait implementations generated by bitflags! macro #218

@Leowbattle

Description

@Leowbattle

I am trying to implement FieldAttributes from C#, and it uses FieldAccessMask and the & operator to separate the field visibility (public, private, etc) from the other flags. This also works in Rust code.

The issue is that there is no way to make it use the & in this way in the fmt::Debug implementation. Playgroud link.

This problem could be gotten around if there was a way to override the fmt::Debug implementation.

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