pub-fields 0.1.1

Provides a proc macro attribute that defaults all struct fields to public.
Documentation
  • Coverage
  • 50%
    1 out of 2 items documented1 out of 1 items with examples
  • Size
  • Source code size: 3.48 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 273.31 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
  • sam0x17/pub-fields
    3 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • sam0x17

A simple attribute that makes all fields public on a struct.

Usage:

#[pub_fields]
pub struct MyStruct {
    a: usize,
    b: usize,
    c: usize,
}

=>

pub struct MyStruct {
    pub a: usize,
    pub b: usize,
    pub c: usize,
}