hickory_resolver

Trait IntoName

Source
pub trait IntoName: Sized {
    // Required methods
    fn into_name(self) -> Result<Name, ProtoError>;
    fn to_ip(&self) -> Option<IpAddr>;
}
Expand description

Conversion into a Name

Required Methods§

Source

fn into_name(self) -> Result<Name, ProtoError>

Convert this into Name

Source

fn to_ip(&self) -> Option<IpAddr>

Check if this value is a valid IP address

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl IntoName for &String

Source§

fn into_name(self) -> Result<Name, ProtoError>

Performs a utf8, IDNA or punycode, translation of the &String into Name

Source§

fn to_ip(&self) -> Option<IpAddr>

Source§

impl IntoName for String

Source§

fn into_name(self) -> Result<Name, ProtoError>

Performs a utf8, IDNA or punycode, translation of the String into Name

Source§

fn to_ip(&self) -> Option<IpAddr>

Source§

impl<'a> IntoName for &'a str

Source§

fn into_name(self) -> Result<Name, ProtoError>

Performs a utf8, IDNA or punycode, translation of the str into Name

Source§

fn to_ip(&self) -> Option<IpAddr>

Implementors§

Source§

impl<T> IntoName for T
where T: Into<Name>,