Struct fields changed to inherit privacy of the struct

(Rust #11522)