Crates.io | pub-fields |
lib.rs | pub-fields |
version | 0.1.1 |
source | src |
created_at | 2023-07-05 14:01:58.193674 |
updated_at | 2023-07-05 14:56:25.413357 |
description | Provides a proc macro attribute that defaults all struct fields to public. |
homepage | |
repository | https://github.com/sam0x17/pub-fields |
max_upload_size | |
id | 909086 |
size | 2,851 |
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,
}