domain
domain copied to clipboard
Difference between domain::base::name::Dname and domain::rdata::dname::Dname?
I've gotten these types mixed up a few times:
- https://docs.rs/domain/latest/domain/base/name/struct.Dname.html
- https://docs.rs/domain/latest/domain/rdata/dname/struct.Dname.html
How exactly do they differ? In which cases in the second one used? It is possible to maybe fold them into a single type? The same-name does lead to a bit of confusion.
Sorry for the late reply. Summer vacation and all that.
The type in the rdata module is for the DNAME record type, which is like a CNAME but delegates the entire tree under the name to a new location not just a single specific name.
The clash between the names is unfortunate, indeed, but I don’t think we can do anything about it at this point. Renaming base::Dname<_> would be quite the hassle now.
The type in the rdata module is for the DNAME record type, which is like a CNAME but delegates the entire tree under the name to a new location not just a single specific name.
Thanks for the explanation; today I learnt something!
Renaming base::Dname<_> would be quite the hassle now.
Definitely non-trivial. Maybe it's a breaking change that can be considered before the 1.0 release? I'm sure that rust_analyzer's rename-type feature can do most of the heavy lifting.