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.