pub-fields

Crates.iopub-fields
lib.rspub-fields
version0.1.1
sourcesrc
created_at2023-07-05 14:01:58.193674
updated_at2023-07-05 14:56:25.413357
descriptionProvides a proc macro attribute that defaults all struct fields to public.
homepage
repositoryhttps://github.com/sam0x17/pub-fields
max_upload_size
id909086
size2,851
Sam Johnson (sam0x17)

documentation

README

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,
}
Commit count: 6

cargo fmt