Safe Way to access private fields in Rust
Reading Time: 2 minutes Do you want your fields to be private but got stuck in accessing them from other module. Then this blog let you know the ways to access the private fields as well as which one is safer way. There are two approaches : with getter and setter without getter and setter [A] with getter and setter You can create a public struct with private fields. Continue Reading