| Crates.io | make_pub |
| lib.rs | make_pub |
| version | 1.0.1 |
| created_at | 2025-11-06 02:27:44.95029+00 |
| updated_at | 2025-11-06 02:27:44.95029+00 |
| description | Macro that makes all Fields in a struct public |
| homepage | https://github.com/JulianWogersien/make_pub |
| repository | |
| max_upload_size | |
| id | 1918983 |
| size | 39,415 |
This rust macro makes all fields in the struct its used on public. Useful for example when you have a large struct that stores configuration
To use this simply use this as a macro on a struct like so
#[make_pub]
#[derive(Debug)]
struct Conf {
field1: i32,
field2: f32,
}
Then you may check with cargo expand that the previously private fields have become public