4 releases

0.2.1 Jul 29, 2019
0.2.0 Jul 29, 2019
0.1.1 Jul 26, 2019
0.1.0 Jul 25, 2019

#340 in #header

Download history 53/week @ 2024-03-11 38/week @ 2024-03-18 43/week @ 2024-04-01 23/week @ 2024-04-08 49/week @ 2024-04-15 58/week @ 2024-04-22 34/week @ 2024-04-29 45/week @ 2024-05-06 13/week @ 2024-05-13 4/week @ 2024-05-20 67/week @ 2024-05-27 59/week @ 2024-06-03 59/week @ 2024-06-10 18/week @ 2024-06-17 13/week @ 2024-06-24

154 downloads per month

MPL-2.0 license

10KB
140 lines

tablefy_derive

tablefy_derive tablefy_derive

A procedural macro to derive the Tablefy trait for any struct. (Currently with the limitation that said struct needs to have values that implement the Display trait.)

Changelog to keep track of progress

#[derive(Tablefy)]

The main derive macro! Derives the Tablefy trait for any struct satisfying the before-mentioned limitation (for now). The field names are set as the headers, with the contents being set as the rows. However, if you want to change the name of the headers, then you should use...

#[header(name = <str>)]

Put this above any field in order to customize what its header name should be. Note that <str> can be any valid string literal. If any cryptic errors arise from using this however, feel free to raise an issue.

Dependencies

~2MB
~46K SLoC