Martin HoffmannandGitHub 4d13b01022 Allow ?Sized where appropriate. (#168)
This commit adds a ?Sized trait bound to all types that exclusively wrap an
octets sequence. In the process, it also does some cleanup here and there to
improve consistency of the crate.

Specifically, it includes the following noteworthy changes:

   o  All types that wrap an octets sequence only 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
      method for_slice that converts a &self into such a reference. Where
      the latter already existed but returned a value wrapping a &[u8]
      (e.g., Dname<_> and Message<_>, the return type has changed
      accordingly.

   o  Removed CharStr::from_bytes. Use CharStr::from_octets instead.

   o  Message::from_octets now returns a new error type ShortMessage.

   o  Dropped Deref impls for Dname<_>, RelativeDname<_>.

   o  Renamed opt::KeyTag::new to opt::KeyTag::from_octets.

   o  Renamed rdata::Txt::try_from_slice to build_from_slice.
2023-02-06 13:13:44 +01:00
2016-01-26 12:57:02 +01:00
2023-01-04 16:21:19 +01:00

domain – A DNS library for Rust

Current Documentation Mastodon Follow

A library for interacting with the Domain Name System. The crate contains an ever-growing set of building blocks for including DNS functionality in applications.

Currently, these blocks include:

  • basic data structures and functionality for creating and parsing DNS data and messages,
  • support for signing and verifying messages using the TSIG mechanism,
  • experimental support for reading data from DNS master files (also known as zone files),
  • experimental and as yet incomplete support for DNSSEC signing and validation,
  • a simple Tokio-based stub resolver.

If you have ideas, requests, or proposals for future features, pleased don’t hesitate to open Github issues.

Licensing

The domain crate is distributed under the terms of the BSD-3-clause license. See the LICENSE file for details.

S
Description
No description provided
Readme BSD-3-Clause
17 MiB
Languages
Rust 100%