use hard_xml::XmlWrite;
#[derive(Debug, PartialEq, Eq, XmlWrite)]
#[xml(tag = "item")]
pub struct Episode {
#[xml(flatten_text = "guid")]
pub guid: String,
#[xml(flatten_text = "pubDate")]
pub pub_date: String,
#[xml(flatten_text = "title", cdata)]
pub title: String,
#[xml(flatten_text = "link")]
pub link: String,
#[xml(flatten_text = "description", cdata)]
pub description: String,
#[xml(child = "enclosure")]
pub enclosure: Enclosure,
#[xml(flatten_text = "itunes:author")]
pub author: String,
#[xml(child = "itunes:image")]
pub image: Image,
#[xml(flatten_text = "itunes:duration")]
pub duration: String,
#[xml(flatten_text = "itunes:explicit")]
pub explicit_content: String,
}
#[derive(Debug, PartialEq, Eq, XmlWrite)]
#[xml(tag = "enclosure")]
pub struct Enclosure {
#[xml(attr = "url")]
pub file_url: String,
#[xml(attr = "length")]
pub file_length: String,
#[xml(attr = "type")]
pub file_type: String,
}
#[derive(Debug, PartialEq, Eq, XmlWrite)]
#[xml(tag = "itunes:image")]
pub struct Image {
#[xml(attr = "href")]
pub file_url: String,
}