use std::fmt;
use std::borrow::Cow;
use response::NamedResponse;
use response;
#[derive(Deserialize, Debug)]
pub struct Domain {
name: String,
ttl: f64,
zone_file: String
}
impl fmt::Display for Domain {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "Domain:\n\
name: {}\n\
ttl: {:.0}\n\
Zone File: {}\n",
self.name,
self.ttl,
self.zone_file)
}
}
impl response::NotArray for Domain {}
pub type Domains = Vec<Domain>;
impl NamedResponse for Domain {
fn name<'a>() -> Cow<'a, str> {
"domain".into()
}
}