NLnetLabs / domain

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

Add Message::for_slice_ref. #300

Closed partim closed 3 months ago

partim commented 3 months ago

This PR adds a new method Message<_>::for_slice_ref which converts the message to a Message<&[u8]>. This comes in handy when parsing the message content into type that don’t allow unsized octets sequences like AllRecordData<_, _>.