use crate::domain::Domain;
use crate::ip::IPAddress;
#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug)]
pub enum Host {
Address(IPAddress),
Name(Domain),
}
impl ToString for Host {
fn to_string(&self) -> String {
match self {
Host::Address(ip) => ip.to_string(),
Host::Name(domain) => domain.to_string(),
}
}
}