Skip to main content

IntoName

Trait IntoName 

pub trait IntoName: Sized {
    // Required methods
    fn into_name(self) -> Result<Name, ProtoError>;
    fn to_ip(&self) -> Option<IpAddr>;
}
Available on crate features dns and hickory only.
Expand description

Conversion into a Name

Required Methods§

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

Convert this into Name

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".

Implementations on Foreign Types§

§

impl IntoName for &str

§

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

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

§

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

Implementors§

§

impl IntoName for &String

§

impl IntoName for String

§

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