Enum addr::Host [−][src]
pub enum Host { Ip(IpAddr), Domain(DomainName), }
Holds information about a particular host
This is created by List::parse_host
.
Variants
Ip(IpAddr)
Domain(DomainName)
Methods
impl Host
[src]
impl Host
pub fn is_ip(&self) -> bool
[src]
pub fn is_ip(&self) -> bool
A convenient method to simply check if a host is an IP address
pub fn is_domain(&self) -> bool
[src]
pub fn is_domain(&self) -> bool
A convenient method to simply check if a host is a domain name
Trait Implementations
impl Debug for Host
[src]
impl Debug for Host
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl FromStr for Host
[src]
impl FromStr for Host
type Err = Error
The associated error which can be returned from parsing.
fn from_str(host: &str) -> Result<Host>
[src]
fn from_str(host: &str) -> Result<Host>
Parses a string s
to return a value of this type. Read more
impl Display for Host
[src]
impl Display for Host
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq<str> for Host
[src]
impl PartialEq<str> for Host