Struct DnsName

struct DnsName<'a>(_)

A type which encapsulates a string (borrowed or owned) that is a syntactically valid DNS name.

Implementations

impl<'a> DnsName<'a>

fn borrow(self: &'a Self) -> Self

Produce a borrowed DnsName from this owned DnsName.

fn to_lowercase_owned(self: &Self) -> DnsName<'static>

Copy this object to produce an owned DnsName, smashing the case to lowercase in one operation.

fn to_owned(self: &Self) -> DnsName<'static>

Produce an owned DnsName from this (potentially borrowed) DnsName.

const fn try_from_str(s: &str) -> Result<DnsName<'_>, InvalidDnsNameError>

Produces a borrowed DnsName from a borrowed str.

impl AsRef for DnsName<'_>

fn as_ref(self: &Self) -> &str

impl TryFrom for DnsName<'static>

fn try_from(value: String) -> Result<Self, <Self as >::Error>

impl<'a> Clone for DnsName<'a>

fn clone(self: &Self) -> DnsName<'a>

impl<'a> Debug for DnsName<'a>

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result

impl<'a> Eq for DnsName<'a>

impl<'a> Freeze for DnsName<'a>

impl<'a> Hash for DnsName<'a>

fn hash<__H: $crate::hash::Hasher>(self: &Self, state: &mut __H)

impl<'a> PartialEq for DnsName<'a>

fn eq(self: &Self, other: &DnsName<'a>) -> bool

impl<'a> RefUnwindSafe for DnsName<'a>

impl<'a> Send for DnsName<'a>

impl<'a> StructuralPartialEq for DnsName<'a>

impl<'a> Sync for DnsName<'a>

impl<'a> TryFrom for DnsName<'a>

fn try_from(value: &'a str) -> Result<Self, <Self as >::Error>

impl<'a> TryFrom for DnsName<'a>

fn try_from(value: &'a [u8]) -> Result<Self, <Self as >::Error>

impl<'a> Unpin for DnsName<'a>

impl<'a> UnwindSafe for DnsName<'a>

impl<T> Any for DnsName<'a>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for DnsName<'a>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for DnsName<'a>

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for DnsName<'a>

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for DnsName<'a>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for DnsName<'a>

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T, U> Into for DnsName<'a>

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for DnsName<'a>

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for DnsName<'a>

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>