NLnetLabs / domain

A DNS library for Rust.
https://nlnetlabs.nl/projects/domain/about/
BSD 3-Clause "New" or "Revised" License
341 stars 57 forks source link

Switch `ToDname` et al. to have a `try_to_dname`/`to_dname` pair. #281

Closed partim closed 5 months ago

partim commented 6 months ago

Currently, ToDname and ToRelativeDname only have methods that can fail if the buffer is too small. Change this to the approach used elsewhere where a try_to method returns an error and a plain to method without error is available for octets type that have unlimited buffers.