make_pub 1.0.1

Macro that makes all Fields in a struct public
Documentation
  • Coverage
  • 0%
    0 out of 2 items documented0 out of 1 items with examples
  • Size
  • Source code size: 38.94 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 271.29 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 5s Average build duration of successful builds.
  • all releases: 5s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • JulianWogersien

make_pub

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