https://github.com/sam0x17/pub-fields
A simple proc macro that makes all fields of a struct public
https://github.com/sam0x17/pub-fields
Last synced: 8 months ago
JSON representation
A simple proc macro that makes all fields of a struct public
- Host: GitHub
- URL: https://github.com/sam0x17/pub-fields
- Owner: sam0x17
- Created: 2023-07-05T13:59:40.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-07-05T14:56:20.000Z (over 2 years ago)
- Last Synced: 2025-03-14T14:21:15.753Z (10 months ago)
- Language: Rust
- Size: 3.91 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
A simple attribute that makes all fields public on a struct.
Usage:
```rust
#[pub_fields]
pub struct MyStruct {
a: usize,
b: usize,
c: usize,
}
```
=>
```rust
pub struct MyStruct {
pub a: usize,
pub b: usize,
pub c: usize,
}
```