Skip to content

Breaking change: replace DnsNameAsRef<[u8]> w/ AsRef<str> #45

@cpu

Description

@cpu

In #42 we discussed the AsRef trait implementations for the existing DnsNameRef and DnsName types, as well as the new WildcardDnsNameRef type.

We reached the conclusion that WildcardDnsNameRef should implement AsRef<str>, since it best captures the guarantee that the contents of WildcardDnsNameRef are valid UTF-8, and its trivial to go from &str to &[u8]. See this discussion thread for more information.

The same reasoning can be applied to DnsName/DnsNameRef. Both should offer AsRef<str> and we should remove the AsRef<[u8]> impl from DnsNameRef. This will be a breaking change, so we need to hold this for the next API incompatible change set.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions