Skip to content

A simple proc macro that makes all fields of a struct public

Notifications You must be signed in to change notification settings

sam0x17/pub-fields

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A simple proc macro that makes all fields of a struct public

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages