#structs #record #utilities #generate #debugging #string #default

macro recorder

Generate data-only structs with utilities easily

3 unstable releases

0.2.1 Jan 6, 2023
0.1.1 Apr 25, 2022
0.1.0 Apr 25, 2022

#1673 in Procedural macros

Download history 22/week @ 2024-02-21 91/week @ 2024-02-28

108 downloads per month

MIT license

6KB
100 lines

recorder

Simple record types for Rust

Getting Started

Here's a simple example:

#[recorder::record] // this struct will be #[derive(Debug, Clone, Serialize, Deserialize)]
pub struct MyRecord {
    a: String, // this will be `pub`
    b: u8, // this too!
    c: Vec<String>, // and this!
    #[record(skip)] d: String // this field will be preserved (private by default)
}

Dependencies

~1.5MB
~35K SLoC