toml
toml copied to clipboard
Consider splitting `Decor` out of types
Right now, we have
-
Value::*which isFormattedwhich hasDecorandRepr -
Arraywhich hasDecorandSpan -
InlineTablewhich hasDecorandSpan -
Keywhich has twoDecors andRepr
This makes it annoying for operating on a Values decor because you have to handle every case differently. This also requires manual work to maintain the Decor when changing a Value.
Could have a pub Decoration type and pub Decorated<T>?
Would love to do something similar for Repr but we have to make sure that gets deleted when a Value is overwritten.