rust-bitfield icon indicating copy to clipboard operation
rust-bitfield copied to clipboard

Use the :vis fragment specifier

Open dzamlo opened this issue 5 years ago • 2 comments

dzamlo avatar Oct 26 '18 22:10 dzamlo

Would this allow you to add visibility modifiers to methods? IE u8, pub foo, pub set_foo: x, y; I can't seem to access the methods from other modules since they are private

TheDan64 avatar Nov 07 '18 20:11 TheDan64

You can already add a pub modifier to a field. This will make the two method public. There is an example in the bitfield_fields documentation.

The goal of this issue is to simplify the code and support the more advanced visibility modifier like pub(crate).

dzamlo avatar Nov 07 '18 20:11 dzamlo