0.8.0
Breaking Changes
- The minimal required Rust version is now 1.65. (#160)
- The
random
feature has been dropped in favour of usingrand
. (#204) - The generic octets foundation has been moved to a new crate octseq and completely revamped with Generic Associated Types stabilized in Rust 1.65. This required changes all over the code but, hopefully, should result in relatively few changes when using the crate. (#160)
- The range, slice, and split methods on the domain name types have changed. They have been merge into a single method taking ranges – except for those on
Dname
that require type changes. The split methods now take references and don’t changeself
anymore. (#160) - The
Parse
,Compose
, andScan
traits have been demoted to mere extension traits for foreign types (primarily the built-in integers, so that you can do things likeu16::parse
). All other types now simply have methods matching the patterns. Where generics are necessary, dedicated traits have been added. E.g., there now areParseRecordData
andComposeRecordData
traits that are implemented by all record data types. (#160) - The
Deref
andDerefMut
impls have been removed for most types that had them to follow guidance that they are exclusively for use by pointer types – which none of them are.len
andis_empty
methods have been added where appropriate, additional methods may be added. (#205) - Various functions and methods of the
tsig
module now expect the current time as an argument to allow use of the module in a no-std environment. (#152) - Parsing of representation format and zonefiles has been completely re-written. (#142, based on work in #109 by Martin Fischer)
- All types that wrap an octets sequence only now allow unsized octets sequence types. They all have an associated function
from_slice
to create a reference to a value wrapping an (unsized) octets slice and methodfor_slice
that converts a&self
into such a reference. Where the latter already existed but returned a value wrapping a&[u8]
(e.g.,Dname<_>
andMessage<_>
, the return type has changed accordingly. (#168) - Removed
CharStr::from_bytes
. UseCharStr::from_octets
instead. (#168) Message::from_octets
now returns a new error typeShortMessage
. (#168)- Dropped
Deref
impls forDname<_>
,RelativeDname<_>
. (#168) - Renamed
opt::KeyTag::new
toopt::KeyTag::from_octets
. (#168) - Renamed
rdata::Txt::try_from_slice
tobuild_from_slice
. (#168) - The
new
method of the following record data types now check whether the wire format representation of the record data is too long and thus returns a result:Tsig<_, _>
,Dnskey<_>
,Rrsig<_, _>
,Ds<_>
,Cdnskey<_>
,Cds<_>
. (#169) - The
new
function forrdata::Null<_>
has been replaced with afrom_octets
andfrom_slice
pair. TheDeref
impl was removed. (#169) - The
rdata::svcb
module has been refactored to work in the same way as other type-length-value constructs. The names of types, methods, and functions have changed both to match the usual nomenclature as well as to match the terms used in the SVCB draft. (#176) - The
base::iana::SvcbParamKey
type has been renamed toSvcParamKey
to match the terms used in the SVCB draft. (#176) - The
TcpKeepalive
option has been changed to use anOption<u16>
as its data and allow for an empty option in accordance with the RFC. (#185) - Renamed the sub-modules of
rdata
that contain record data types to use a name derived from their content rather than their RFC number – with the exception ofrdata::rfc1035
. (#189) - Renamed the sub-modules of
base::opt
that contain option data types to use short-hand names rather than their RFC number. (#190) - TTL values are now using a newtype
base::record::Ttl
that wraps the rawu32
and improves conversions. (#202 by @CrabNejonas) - Changes all option data types to ensure their wire format is at most 65,535 octets long. This requires changing the signatures of some creator functions. Their naming scheme and signatures are also changed to follow the pattern established with record data. (#193)
- Renamed
UnknownOptData::from_octets
tonew
and return a result. (#193) - Completely redesigns DNS cookie options, adding support for standard server cookies introduced in RFC 9018. (#193)
- Change the type of
ExtendedError
’s text toStr<Octs>
and change the return type ofset_text
to()
. (#193) - Changed the type
TcpKeepalive
’s content to a newtypeIdleTimeout
to make it easier to convert to and from durations. (#193) - Changes Padding to just contain the padding octets and drop
PaddingMode
. Instead, the methods onOptBuilder
should be used to add padding. (#193)
New
Display
impls are now available for all EDNS0 options. (#157)- Adds a
FromStr
implementation and related functions toRelativeDname
. (#177) - Add a
Debug
impl tobase::message::Message
so it can be unwrapped etc. (#199) - New methods
make_canonical
onDname
andRelativeDname
that convert the name into its canonical, i.e., lowercase form. Similarly, new methodsToDname::to_canonical_dname
andToRelativeDname::to_canonical_relative_dname
that produce new
canonical names. (#200) - Added a
MAX_LEN
constant to various types that wrap length-limited octets sequences. (#201 by @CrabNejonas)