You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be good to have a way to serialize Inner values as inline tables. Currently, to_string will make everything inline, and to_string_pretty will make everything a full table. It would be good to control this per-field, perhaps with a custom field attribute like what serde does.
The text was updated successfully, but these errors were encountered:
serde does not provide a way for you to communicate intent. That just leaves us coming up with some heuristic which I'd like to avoid.
However, you can instead serialize into a toml_edit::Document and the the mod visit_mut API to format it however you wish. This is our generally recommended approach when people want custom formatting and so I'm planning to close this. If you have a reason for us to re-open, let us know!
This issue is reopened from toml-rs/toml-rs#265 as it's still relevant
Given the following set of structures:
It would be good to have a way to serialize
Inner
values as inline tables. Currently,to_string
will make everything inline, andto_string_pretty
will make everything a full table. It would be good to control this per-field, perhaps with a custom field attribute like what serde does.The text was updated successfully, but these errors were encountered: