-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose Extensions
during ser+de through ron::Options
#343
Conversation
@torkleyy Here's my initial attempt at the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late review. I like where this is going!
@torkleyy If you like the API as it is right now (and you give me the go-ahead), I'll start updating the documentation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, go ahead 👍
@torkleyy I've added documentation and the CHANGELOG entry. I also made the following changes to the
I've also made some minor code cleanup adjustments:
|
Expose `Extensions` during ser+de through `ron::Options`
This PR is based on #281 and #339 (with a potential application for #334 as well).
Options
struct from which all ser+de utils methods can be called.XXX
now useOptions::default().XXX
as their implementation.Options
struct can be configured with a set of default RON extensionsa) During deserialization default extensions are automatically enabled, i.e. do not have to be included in the RON.
b) During serialization default extensions are automatically enabled and are not included in the output RON. Additional extensions enabled through the
PrettyConfig
which are not in the set of default extensions are still included in the output RON. Therefore, this PR supersedes Addoutput_extensions
option toPrettyConfig
#339.c) This now enables programs which always use a set of extensions to enable them programmatically and exclude them from the RON config files.
Serializer
andDeserializer
and not changing the default behaviour (i.e. no default extensions).Default
impl forPrettyConfig
.CHANGELOG.md