Crates.io | tablefy_derive |
lib.rs | tablefy_derive |
version | 0.2.1 |
source | src |
created_at | 2019-07-25 21:58:02.954636 |
updated_at | 2019-07-29 21:13:40.964803 |
description | A procedural macro to help Tablefy any struct! |
homepage | |
repository | https://github.com/Calmynt/Tablefy |
max_upload_size | |
id | 151662 |
size | 9,920 |
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.