serde-hex
serde-hex copied to clipboard
Improve configuration ergonomics.
As it stands, configuration must be applied as a generic type parameter (e.g. SerHex::<MyConfig>
). All possible combinations are represented as individual unit structs in the config
module. This is going to get cumbersome fast if more options are added.
Potential solution: expose a macro for easily generating custom config types:
hex_config! {
Foo => {
hello: true,
world: false,
},
// ...
};