-
I know about
#[derive(Debug)]
. -
I want learn how to build
#[derive(Html)]
, which is like Debug, except it outputs a HTML fragment, which when viewed, pretty-prints the struct. (For example, the struct becomes a table, with lhs = field name, rhs = recursive Html of the data). -
I have no idea how to approach this problem (but am decently familiar with Rust). What resources are recommended?
-
This is not a "hw question", feel free to post full solution if it is easy to do
"Custom derive" is what you're looking for.