Open hecatia-elegua opened 1 year ago
Currently, new is always pub and the field visibility is getting applied to both getters and setters. This doesn't have to do with read-/write-only fields, since you might still want to access private get/set in an impl:
new
pub
impl Bitfield { fn z_movement(&self) -> i8 { self.z_first() | (self.z_others() << 1) } }
If we want to fit rust (pub-only, no private), this is a breaking change, or we can maybe use a feature gate.
private
Also, look out for dead_code warnings in user code (users should be able to suppress those).
dead_code
Currently,
new
is alwayspub
and the field visibility is getting applied to both getters and setters. This doesn't have to do with read-/write-only fields, since you might still want to access private get/set in an impl:If we want to fit rust (
pub
-only, noprivate
), this is a breaking change, or we can maybe use a feature gate.Also, look out for
dead_code
warnings in user code (users should be able to suppress those).