Trait tokio_dns::ToEndpoint
[−]
[src]
pub trait ToEndpoint<'a> { fn to_endpoint(self) -> Result<Endpoint<'a>>; }
A trait for objects that can be converted into an Endpoint.
This trait is implemented for the following types:
SocketAddr
,&SocketAddr
- a socket address.(IpAddr, u16)
,(&str, u16)
- a target and a port.&str
- a string formatted as<target>:<port>
where<target>
is a host name or an IP address.
This trait is similar to the ToSocketAddrs
trait, except
that it does not perform host name resolution.
Required Methods
fn to_endpoint(self) -> Result<Endpoint<'a>>
Create an endpoint from this object.