-
-
Notifications
You must be signed in to change notification settings - Fork 10
fix: support all accumulators in enum forward deserialization #70
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
Conversation
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.
Nice work figuring this out, this crate isn't exactly well-documented...
Can you explain at a conceptual level why you want/need this?
Fixing the pre-existing clippy issue in #72. |
6d69830
to
42280d0
Compare
Thanks! Yeah, at this stage it will have to be a dedicated effort for it to happen. Not a big deal right now since those looking at this crate in the first place will probably have a fairly good understanding of serde, which helps.
Sure! My task at work is to add support for secDNS per RFC 5910. (djc/instant-epp#17). The #[derive(Debug, ToXml)]
#[xml(forward)]
pub enum DsOrKeyData<'a> {
DsData(&'a [DsDataType<'a>]),
KeyData(&'a [KeyDataType<'a>]),
}
// is turned into this:
#[derive(Debug, ToXml, FromXml)]
#[xml(forward)]
pub enum DsOrKeyData<'a> {
DsData(Cow<'a, [DsDataType<'a>]>),
KeyData(Cow<'a, [KeyDataType<'a>]>),
} |
67720f6
to
1bff427
Compare
1bff427
to
4bb892f
Compare
Previously limited to Option<T> only.
4bb892f
to
cda5bc4
Compare
Previously limited to Option only.
The following does not compile in main: