make_pub

Crates.iomake_pub
lib.rsmake_pub
version1.0.1
created_at2025-11-06 02:27:44.95029+00
updated_at2025-11-06 02:27:44.95029+00
descriptionMacro that makes all Fields in a struct public
homepagehttps://github.com/JulianWogersien/make_pub
repository
max_upload_size
id1918983
size39,415
Julian wogersien (JulianWogersien)

documentation

README

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

Commit count: 0

cargo fmt