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
154 downloads per month
10KB
140 lines
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