Struct member access style in Rust

Yes, that's very common: within the crate you access the field, and outside the crate you use a getter because accessing the field directly is not possible (due to it not being public).

1 Like