Skip to content

Commit

Permalink
make fields public
Browse files Browse the repository at this point in the history
  • Loading branch information
AnderEnder committed Jun 7, 2020
1 parent 2663695 commit 5f0a476
Show file tree
Hide file tree
Showing 16 changed files with 110 additions and 110 deletions.
4 changes: 2 additions & 2 deletions src/category.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ use crate::util::element_text;
#[cfg_attr(feature = "builders", builder(setter(into), default))]
pub struct Category {
/// The name of the category.
name: String,
pub name: String,
/// The domain for the category.
domain: Option<String>,
pub domain: Option<String>,
}

impl Category {
Expand Down
50 changes: 25 additions & 25 deletions src/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,55 +36,55 @@ use crate::util::element_text;
#[cfg_attr(feature = "builders", builder(setter(into), default))]
pub struct Channel {
/// The name of the channel.
title: String,
pub title: String,
/// The URL for the website corresponding to the channel.
link: String,
pub link: String,
/// A description of the channel.
description: String,
pub description: String,
/// The language of the channel.
language: Option<String>,
pub language: Option<String>,
/// The copyright notice for the channel.
copyright: Option<String>,
pub copyright: Option<String>,
/// The email address for the managing editor.
managing_editor: Option<String>,
pub managing_editor: Option<String>,
/// The email address for the webmaster.
webmaster: Option<String>,
pub webmaster: Option<String>,
/// The publication date for the content of the channel as an RFC822 timestamp.
pub_date: Option<String>,
pub pub_date: Option<String>,
/// The date that the contents of the channel last changed as an RFC822 timestamp.
last_build_date: Option<String>,
pub last_build_date: Option<String>,
/// The categories the channel belongs to.
categories: Vec<Category>,
pub categories: Vec<Category>,
/// A string indicating the program used to generate the channel.
generator: Option<String>,
pub generator: Option<String>,
/// A URL that points to the documentation for the RSS format.
docs: Option<String>,
pub docs: Option<String>,
/// The cloud to register with to be notified of updates to the channel.
cloud: Option<Cloud>,
pub cloud: Option<Cloud>,
/// The PICS rating for the channel.
rating: Option<String>,
pub rating: Option<String>,
/// The number of minutes the channel can be cached before refreshing.
ttl: Option<String>,
pub ttl: Option<String>,
/// An image that can be displayed with the channel.
image: Option<Image>,
pub image: Option<Image>,
/// A text input box that can be displayed with the channel.
text_input: Option<TextInput>,
pub text_input: Option<TextInput>,
/// A hint to tell the aggregator which hours it can skip.
skip_hours: Vec<String>,
pub skip_hours: Vec<String>,
/// A hint to tell the aggregator which days it can skip.
skip_days: Vec<String>,
pub skip_days: Vec<String>,
/// The items in the channel.
items: Vec<Item>,
pub items: Vec<Item>,
/// The extensions for the channel.
extensions: ExtensionMap,
pub extensions: ExtensionMap,
/// The iTunes extension for the channel.
itunes_ext: Option<itunes::ITunesChannelExtension>,
pub itunes_ext: Option<itunes::ITunesChannelExtension>,
/// The Dublin Core extension for the channel.
dublin_core_ext: Option<dublincore::DublinCoreExtension>,
pub dublin_core_ext: Option<dublincore::DublinCoreExtension>,
/// The Syndication extension for the channel.
syndication_ext: Option<syndication::SyndicationExtension>,
pub syndication_ext: Option<syndication::SyndicationExtension>,
/// The namespaces present in the RSS tag.
namespaces: HashMap<String, String>,
pub namespaces: HashMap<String, String>,
}

impl Channel {
Expand Down
10 changes: 5 additions & 5 deletions src/cloud.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ use crate::toxml::ToXml;
#[cfg_attr(feature = "builders", builder(setter(into), default))]
pub struct Cloud {
/// The domain to register with.
domain: String,
pub domain: String,
/// The port to register with.
port: String,
pub port: String,
/// The path to register with.
path: String,
pub path: String,
/// The procedure to register with.
register_procedure: String,
pub register_procedure: String,
/// The protocol to register with.
protocol: String,
pub protocol: String,
}

impl Cloud {
Expand Down
6 changes: 3 additions & 3 deletions src/enclosure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ use crate::toxml::ToXml;
#[cfg_attr(feature = "builders", builder(setter(into), default))]
pub struct Enclosure {
/// The URL of the enclosure.
url: String,
pub url: String,
/// The length of the enclosure in bytes.
length: String,
pub length: String,
/// The MIME type of the enclosure.
mime_type: String,
pub mime_type: String,
}

impl Enclosure {
Expand Down
30 changes: 15 additions & 15 deletions src/extension/dublincore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,36 +26,36 @@ pub const NAMESPACE: &str = "http://purl.org/dc/elements/1.1/";
#[cfg_attr(feature = "builders", builder(setter(into), default))]
pub struct DublinCoreExtension {
/// An entity responsible for making contributions to the resource.
contributors: Vec<String>,
pub contributors: Vec<String>,
/// The spatial or temporal topic of the resource, the spatial applicability of the resource,
/// or the jurisdiction under which the resource is relevant.
coverages: Vec<String>,
pub coverages: Vec<String>,
/// An entity primarily responsible for making the resource.
creators: Vec<String>,
pub creators: Vec<String>,
/// A point or period of time associated with an event in the lifecycle of the resource.
dates: Vec<String>,
pub dates: Vec<String>,
/// An account of the resource.
descriptions: Vec<String>,
pub descriptions: Vec<String>,
/// The file format, physical medium, or dimensions of the resource.
formats: Vec<String>,
pub formats: Vec<String>,
/// An unambiguous reference to the resource within a given context.
identifiers: Vec<String>,
pub identifiers: Vec<String>,
/// A language of the resource.
languages: Vec<String>,
pub languages: Vec<String>,
/// An entity responsible for making the resource available.
publishers: Vec<String>,
pub publishers: Vec<String>,
/// A related resource.
relations: Vec<String>,
pub relations: Vec<String>,
/// Information about rights held in and over the resource.
rights: Vec<String>,
pub rights: Vec<String>,
/// A related resource from which the described resource is derived.
sources: Vec<String>,
pub sources: Vec<String>,
/// The topic of the resource.
subjects: Vec<String>,
pub subjects: Vec<String>,
/// A name given to the resource.
titles: Vec<String>,
pub titles: Vec<String>,
/// The nature or genre of the resource.
types: Vec<String>,
pub types: Vec<String>,
}

impl DublinCoreExtension {
Expand Down
4 changes: 2 additions & 2 deletions src/extension/itunes/itunes_category.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ use crate::toxml::ToXml;
#[cfg_attr(feature = "builders", builder(setter(into), default))]
pub struct ITunesCategory {
/// The name of the category.
text: String,
pub text: String,
// This is contained within a Box to ensure it gets allocated on the heap to prevent an
// infinite size.
/// An optional subcategory for the category.
subcategory: Option<Box<ITunesCategory>>,
pub subcategory: Option<Box<ITunesCategory>>,
}

impl ITunesCategory {
Expand Down
22 changes: 11 additions & 11 deletions src/extension/itunes/itunes_channel_extension.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,32 +25,32 @@ use crate::toxml::{ToXml, WriterExt};
#[cfg_attr(feature = "builders", builder(setter(into), default))]
pub struct ITunesChannelExtension {
/// The author of the podcast.
author: Option<String>,
pub author: Option<String>,
/// Specifies if the podcast should be prevented from appearing in the iTunes Store. A value of
/// `Yes` indicates that the podcast should not show up in the iTunes Store. All other values
/// are ignored.
block: Option<String>,
pub block: Option<String>,
/// The iTunes categories the podcast belongs to.
categories: Vec<ITunesCategory>,
pub categories: Vec<ITunesCategory>,
/// The artwork for the podcast.
image: Option<String>,
pub image: Option<String>,
/// Specifies whether the podcast contains explicit content. A value of `Yes`, `Explicit`, or
/// `True` indicates that the podcast contains explicit content. A value of `Clean`, `No`,
/// `False` inidicates that none of the episodes contain explicit content.
explicit: Option<String>,
pub explicit: Option<String>,
/// Specifies whether the podcast is complete and no new episodes will be posted. A value of
/// `Yes` indicates that the podcast is complete.
complete: Option<String>,
pub complete: Option<String>,
/// The new URL where the podcast is located.
new_feed_url: Option<String>,
pub new_feed_url: Option<String>,
/// The contact information for the owner of the podcast.
owner: Option<ITunesOwner>,
pub owner: Option<ITunesOwner>,
/// A description of the podcast.
subtitle: Option<String>,
pub subtitle: Option<String>,
/// A summary of the podcast.
summary: Option<String>,
pub summary: Option<String>,
/// Keywords for the podcast. The string contains a comma separated list of keywords.
keywords: Option<String>,
pub keywords: Option<String>,
}

impl ITunesChannelExtension {
Expand Down
20 changes: 10 additions & 10 deletions src/extension/itunes/itunes_item_extension.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,31 +24,31 @@ use crate::toxml::{ToXml, WriterExt};
#[cfg_attr(feature = "builders", builder(setter(into), default))]
pub struct ITunesItemExtension {
/// The author of the podcast episode.
author: Option<String>,
pub author: Option<String>,
/// Specifies if the podcast episode should be prevented from appearing in the iTunes Store. A
/// value of `Yes` indicates that the episode should not show up in the iTunes Store. All other
/// values are ignored.
block: Option<String>,
pub block: Option<String>,
/// The artwork for the podcast episode.
image: Option<String>,
pub image: Option<String>,
/// The podcast episode duration in one of the following formats: HH:MM:SS, H:MM:SS, MM:SS,
/// M:SS.
duration: Option<String>,
pub duration: Option<String>,
/// Specifies whether the podcast episode contains explicit content. A value of `Yes`,
/// `Explicit`, or `True` indicates that the episode contains explicit content. A value of
/// `Clean`, `No`, `False` inidicates that episode does not contain explicit content.
explicit: Option<String>,
pub explicit: Option<String>,
/// Specifies whether the podcast episode contains embedded closed captioning. A value of `Yes`
/// indicates that it does. Any other value indicates that it does not.
closed_captioned: Option<String>,
pub closed_captioned: Option<String>,
/// A value used to override the default sorting order for episodes.
order: Option<String>,
pub order: Option<String>,
/// A description of the podcast episode.
subtitle: Option<String>,
pub subtitle: Option<String>,
/// A summary of the podcast episode.
summary: Option<String>,
pub summary: Option<String>,
/// Keywords for the podcast. The string contains a comma separated list of keywords.
keywords: Option<String>,
pub keywords: Option<String>,
}

impl ITunesItemExtension {
Expand Down
4 changes: 2 additions & 2 deletions src/extension/itunes/itunes_owner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ use crate::toxml::{ToXml, WriterExt};
#[cfg_attr(feature = "builders", builder(setter(into), default))]
pub struct ITunesOwner {
/// The name of the owner.
name: Option<String>,
pub name: Option<String>,
/// The email of the owner.
email: Option<String>,
pub email: Option<String>,
}

impl ITunesOwner {
Expand Down
8 changes: 4 additions & 4 deletions src/extension/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ pub type ExtensionMap = HashMap<String, HashMap<String, Vec<Extension>>>;
#[cfg_attr(feature = "builders", builder(setter(into), default))]
pub struct Extension {
/// The qualified name of the extension element.
name: String,
pub name: String,
/// The content of the extension element.
value: Option<String>,
pub value: Option<String>,
/// The attributes for the extension element.
attrs: HashMap<String, String>,
pub attrs: HashMap<String, String>,
/// The children of the extension element. This is a map of local names to child
/// elements.
children: HashMap<String, Vec<Extension>>,
pub children: HashMap<String, Vec<Extension>>,
}

impl Extension {
Expand Down
6 changes: 3 additions & 3 deletions src/extension/syndication.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ impl fmt::Display for UpdatePeriod {
#[cfg_attr(feature = "builders", builder(setter(into), default))]
pub struct SyndicationExtension {
/// The refresh period for this channel
period: UpdatePeriod,
pub period: UpdatePeriod,
/// Number of periods between refreshes
frequency: u32,
pub frequency: u32,
/// Timestamp from which the refresh periods are calculated
base: String,
pub base: String,
}

impl SyndicationExtension {
Expand Down
4 changes: 2 additions & 2 deletions src/guid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ use crate::util::element_text;
#[cfg_attr(feature = "builders", builder(setter(into), default))]
pub struct Guid {
/// The value of the GUID.
value: String,
pub value: String,
/// Indicates if the GUID is a permalink.
permalink: bool,
pub permalink: bool,
}

impl Guid {
Expand Down
12 changes: 6 additions & 6 deletions src/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ use crate::util::element_text;
#[cfg_attr(feature = "builders", builder(setter(into), default))]
pub struct Image {
/// The URL of the image.
url: String,
pub url: String,
/// A description of the image. This is used in the HTML `alt` attribute.
title: String,
pub title: String,
/// The URL that the image links to.
link: String,
pub link: String,
/// The width of the image.
width: Option<String>,
pub width: Option<String>,
/// The height of the image.
height: Option<String>,
pub height: Option<String>,
/// The text for the HTML `title` attribute of the link formed around the image.
description: Option<String>,
pub description: Option<String>,
}

impl Image {
Expand Down

0 comments on commit 5f0a476

Please sign in to comment.