tablefy_derive

Crates.iotablefy_derive
lib.rstablefy_derive
version0.2.1
sourcesrc
created_at2019-07-25 21:58:02.954636
updated_at2019-07-29 21:13:40.964803
descriptionA procedural macro to help Tablefy any struct!
homepage
repositoryhttps://github.com/Calmynt/Tablefy
max_upload_size
id151662
size9,920
A (enbyss)

documentation

README

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.

Commit count: 26

cargo fmt