[GH-ISSUE #961] Add serde support for trust-dns-server #575

Open
opened 2026-03-15 23:15:33 +03:00 by kerem · 2 comments
Owner

Originally created by @zlnpgtdtfezf on GitHub (Dec 17, 2019).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/961

Is your feature request related to a problem? Please describe.
I want to derive serde's Serialize trait for a struct that contains the enum ZoneType from trust dns server.

Describe the solution you'd like
Add a feature flag to enable serde compatibility

Describe alternatives you've considered
Currently you have to manually create the implementation for the struct :/

Additional context
None

Originally created by @zlnpgtdtfezf on GitHub (Dec 17, 2019). Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/961 **Is your feature request related to a problem? Please describe.** I want to derive serde's Serialize trait for a struct that contains the enum ZoneType from trust dns server. **Describe the solution you'd like** Add a feature flag to enable serde compatibility **Describe alternatives you've considered** Currently you have to manually create the implementation for the struct :/ **Additional context** None
Author
Owner

@bluejekyll commented on GitHub (Dec 17, 2019):

Currently we have deserialize defined:

https://github.com/bluejekyll/trust-dns/blob/master/crates/server/src/authority/zone_type.rs#L9

I thought we had that configured to be off by default, but maybe that’s only in proto. If you want to submit a PR for this, please do.

Please add some sanity checks for serializing and deserialize if you do. Thanks!

<!-- gh-comment-id:566644372 --> @bluejekyll commented on GitHub (Dec 17, 2019): Currently we have deserialize defined: https://github.com/bluejekyll/trust-dns/blob/master/crates/server/src/authority/zone_type.rs#L9 I thought we had that configured to be off by default, but maybe that’s only in proto. If you want to submit a PR for this, please do. Please add some sanity checks for serializing and deserialize if you do. Thanks!
Author
Owner

@bluejekyll commented on GitHub (Dec 17, 2019):

Where necessary, here's an example of deriving serialize optionally in some of the other libraries: github.com/bluejekyll/trust-dns@c3180ab064/crates/resolver/src/config.rs (L30)

<!-- gh-comment-id:566711663 --> @bluejekyll commented on GitHub (Dec 17, 2019): Where necessary, here's an example of deriving serialize optionally in some of the other libraries: https://github.com/bluejekyll/trust-dns/blob/c3180ab0640d1c552752683770549353623fc8dc/crates/resolver/src/config.rs#L30
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#575
No description provided.