This repository was archived by the owner on Mar 25, 2024. It is now read-only.
- Adding support for explicit tag based discriminant for Rust Enum parsing for serde_yaml #220
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There is being started as a draft PR as there is change needed in yaml_rust implementation for propagation of tags for sequence and mapping start events. The change in yaml_rust address chyh1990/yaml-rust#147 (pending PR request filed there. Currently, Cargo.toml points to the public fork where the fix exists. This makes PR local checkout, building and inspecting the work easier), #147, that allows for explicit tags to be used to map to the Enum.
Please note, this PR explicitly choose not to address serialization with explicit tag discriminators. It isn't clear what dependency the consumers of this crate's have on the output serialization format. Can follow up with a separate PR change for Serializer change. @dtolnay seeking your advice on compatibility here.
Summary of the change:
when a call is being made for
de::VariantAccess::newtype_variant
it delegate correctly to get the value, seeenum Message
type intest_de.rs