When I use JSON to Rust generate a file like below: ``` pub struct Record{ #[serde(rename = "CODE")] code: String, #[serde(rename = "SECURITY_CODE")] security_code: String, #[serde(rename = "NAME")] name_abbr: String, } ``` But, when I should access the field , I should get a error ,because of it is not visibility。I need a result like this: ``` pub struct Record{ #[serde(rename = "CODE")] pub code: String, #[serde(rename = "SECURITY_CODE")] pub security_code: String, #[serde(rename = "NAME")] pub name_abbr: String, } ``` If had a switch to control the soft , whether generate the keywork `pub`, it should be more perfect.
When I use JSON to Rust generate a file like below:
But, when I should access the field , I should get a error ,because of it is not visibility。I need a result like this:
If had a switch to control the soft , whether generate the keywork
pub, it should be more perfect.