mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 11:15:54 +03:00
[GH-ISSUE #897] Support for RDATA presentation format #557
Labels
No labels
blocked
breaking-change
bug
bug:critical
bug:tests
cleanup
compliance
compliance
compliance
crate:all
crate:client
crate:native-tls
crate:proto
crate:recursor
crate:resolver
crate:resolver
crate:rustls
crate:server
crate:util
dependencies
docs
duplicate
easy
easy
enhance
enhance
enhance
feature:dns-over-https
feature:dns-over-quic
feature:dns-over-tls
feature:dnsssec
feature:global_lb
feature:mdns
feature:tsig
features:edns
has workaround
ops
perf
platform:WASM
platform:android
platform:fuchsia
platform:linux
platform:macos
platform:windows
pull-request
question
test
tools
tools
trust
unclear
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hickory-dns#557
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @rotty on GitHub (Oct 21, 2019).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/897
I'm currently (slowly) working on adding the "presentation format" of various record types to
tdns-cli. This functionality may make sense to have intrust-dns-proto; the API might look something like this:That is, the
RDataenum would gain an additional method, named something likedisplay()(which has precedent instd::path::Path) orpresentation()(which would follow RFC terminology), that returns a type that implementsstd::fmt::Display. It may also make sense to add such a method to all types wrapped byRData(e.g., forrdata::caa::CAAitself) that do not already implementDisplaythemselves.I would first finish the code in
tdns-cli(seequery.rsfor the measly beginnings), and when I've implemented all record types and added tests, I'd construct a PR based on that, if there's interest for this feature.@bluejekyll commented on GitHub (Oct 22, 2019):
I think doing
displaywould be fine. It might be enough to change addDisplayimplementations for all the RData's? I've been intending to do this at some point, but never got around to it.Most are pretty simple conversions. I think we only have the text serialization routines in the
client, we might want to continue that president to keep theresolverlightweight.@rotty commented on GitHub (Oct 23, 2019):
Yeah, just adding a
Displayimplementations to all encapsulated RData types andRDataitself should work; no need for the indirection.How would that work? Due to the orphan rules, one cannot add
Displayimplementations in theclientcrate for types defined in theprotocrate, I think. I agree however that adding them toprotodirectly is not ideal, as that would add (at least) a dependency on thedata-encodingcrate (for base64, base32 and base16 encodings), which would be nice to avoid. The alternative would be to add a newtype wrapper, e.g.,ShowRData<'a>(&'a RData)which then implementsDisplay. This could be added to the crate where it makes the most sense, such asclient.@bluejekyll commented on GitHub (Mar 19, 2022):
I can't point to exact PRs, but I think this is complete at this point.