pub-fields/README.md
Sam Johnson 5b8b1366e3
docs
2023-07-05 09:59:06 -04:00

254 B

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,
}