Decision Workspace
field_accessor vs field_accessor_pub vs duck-trait
Side-by-side comparison of Rust crates
43
field_accessor
growingv0.6.2
A procedural macro to get and set a struct field by String dynamically.
41
field_accessor_pub
growingv0.5.3
A procedural macro to get and set a struct field by String dynamically. This crate is a quick and dirty fork of field_accessor_pub.
52
duck-trait
experimentalv0.13.1
Generate duck-typing accessor traits (get / set / get_mut): declare once in _fields.rs with fields!, every struct field implements them by default under #[props] — ignore fields with #[_prop], or use the scoped #[duck] marker api.
Core Metrics
| field_accessor | field_accessor_pub | duck-trait | |
|---|---|---|---|
| Health Score | 43 | 41 | 52 |
| Total Downloads | 24.1K | 3.5K | 156 |
| 30d Downloads | 0 | 0 | 0 |
| Dependents | 43 | 33 | 0 |
| Releases | 12 | 2 | 10 |
| Last Updated | 378d ago | 960d ago | 37d ago |
| Age | 4y 5m | 2y 7m | 1m |
Health Breakdown
field_accessor
Maintenance
5
Quality
14
Community
9
Popularity
5
Documentation
10
field_accessor_pub
Maintenance
4
Quality
14
Community
9
Popularity
4
Documentation
10
duck-trait
Maintenance
17
Quality
14
Community
6
Popularity
3
Documentation
12
Technical Details
| field_accessor | field_accessor_pub | duck-trait | |
|---|---|---|---|
| Version | 0.6.2 | 0.5.3 | 0.13.1 |
| Stable (≥1.0) | ✗ No | ✗ No | ✗ No |
| License | MIT | MIT | MIT OR Apache-2.0 |
| Dependencies | 3 | 2 | 3 |
| Crate Size | 281KB | 279KB | 17KB |
| Features | 0 | 0 | 0 |
| Yanked % | 0.0% | 0.0% | 0.0% |
| Edition | 2021 | 2021 | 2024 |
| MSRV | — | — | 1.85 |
| Owners | 1 | 1 | 1 |
Links
Quick Verdict
- •duck-trait leads with a health score of 52/100, but none of the options score above 80.
- •field_accessor has the most downloads (24.1K), suggesting wider adoption.
- •⚠ field_accessor, field_accessor_pub have not been updated in over a year.