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

add AsRef impl for Record to allow for passing records by references when signing #288

Closed hunts closed 5 months ago

hunts commented 5 months ago

One of the use case is to allow for both owned or borrowed records in the mutable slice when composing the signed data.

Without this, in some cases, the caller would have to clone records if they only hold a (im)mutable slice of record references or an immutable slice of record values.

partim commented 5 months ago

Thank you for the PR! This looks like a useful change, indeed.

hunts commented 5 months ago

Thank you Martin, cheers!