pub struct ITunesItemExtension {
Show 13 fields pub author: Option<String>, pub block: Option<String>, pub image: Option<String>, pub duration: Option<String>, pub explicit: Option<String>, pub closed_captioned: Option<String>, pub order: Option<String>, pub subtitle: Option<String>, pub summary: Option<String>, pub keywords: Option<String>, pub episode: Option<String>, pub season: Option<String>, pub episode_type: Option<String>,
}
Expand description

An iTunes item element extension.

Fields§

§author: Option<String>

The author of the podcast episode.

§block: 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.

§image: Option<String>

The artwork for the podcast episode.

§duration: Option<String>

The podcast episode duration in one of the following formats: HH:MM:SS, H:MM:SS, MM:SS, M:SS.

§explicit: 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 indicates that episode does not contain explicit content.

§closed_captioned: 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.

§order: Option<String>

A value used to override the default sorting order for episodes.

§subtitle: Option<String>

A description of the podcast episode.

§summary: Option<String>

A summary of the podcast episode.

§keywords: Option<String>

Keywords for the podcast. The string contains a comma separated list of keywords.

§episode: Option<String>

Episode number for this episode.

§season: Option<String>

Season number for this episode.

§episode_type: Option<String>

Type of episode. Usually full, but potentially also trailer or bonus

Implementations§

source§

impl ITunesItemExtension

source

pub fn author(&self) -> Option<&str>

Return the author of this podcast episode.

§Examples
use rss::extension::itunes::ITunesItemExtension;

let mut extension = ITunesItemExtension::default();
extension.set_author("John Doe".to_string());
assert_eq!(extension.author(), Some("John Doe"));
source

pub fn set_author<V>(&mut self, author: V)
where V: Into<Option<String>>,

Set the author of this podcast episode.

§Examples
use rss::extension::itunes::ITunesItemExtension;

let mut extension = ITunesItemExtension::default();
extension.set_author("John Doe".to_string());
source

pub fn block(&self) -> Option<&str>

Return whether this podcast episode should be blocked 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.

§Examples
use rss::extension::itunes::ITunesItemExtension;

let mut extension = ITunesItemExtension::default();
extension.set_block("Yes".to_string());
assert_eq!(extension.block(), Some("Yes"));
source

pub fn set_block<V>(&mut self, block: V)
where V: Into<Option<String>>,

Set whether this podcast episode should be blocked 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.

§Examples
use rss::extension::itunes::ITunesItemExtension;

let mut extension = ITunesItemExtension::default();
extension.set_block("Yes".to_string());
source

pub fn image(&self) -> Option<&str>

Return the artwork URL for this podcast episode.

§Examples
use rss::extension::itunes::ITunesItemExtension;

let mut extension = ITunesItemExtension::default();
extension.set_image("http://example.com/artwork.png".to_string());
assert_eq!(extension.image(), Some("http://example.com/artwork.png"));
source

pub fn set_image<V>(&mut self, image: V)
where V: Into<Option<String>>,

Set the artwork URL for this podcast episode.

§Examples
use rss::extension::itunes::ITunesItemExtension;

let mut extension = ITunesItemExtension::default();
extension.set_image("http://example.com/artwork.png".to_string());
source

pub fn duration(&self) -> Option<&str>

Return the duration of this podcast episode.

The duration should be in one of the following formats: HH:MM:SS, H:MM:SS, MM:SS, M:SS.

§Examples
use rss::extension::itunes::ITunesItemExtension;

let mut extension = ITunesItemExtension::default();
extension.set_duration("1:00".to_string());
assert_eq!(extension.duration(), Some("1:00"));
source

pub fn set_duration<V>(&mut self, duration: V)
where V: Into<Option<String>>,

Set the duration of this podcast episode.

The duration should be in one of the following formats: HH:MM:SS, H:MM:SS, MM:SS, M:SS.

§Examples
use rss::extension::itunes::ITunesItemExtension;

let mut extension = ITunesItemExtension::default();
extension.set_duration("1:00".to_string());
source

pub fn explicit(&self) -> Option<&str>

Return whether this 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 indicates that episode does not contain explicit content.

§Examples
use rss::extension::itunes::ITunesItemExtension;

let mut extension = ITunesItemExtension::default();
extension.set_explicit("Yes".to_string());
assert_eq!(extension.explicit(), Some("Yes"));
source

pub fn set_explicit<V>(&mut self, explicit: V)
where V: Into<Option<String>>,

Set whether this 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 indicates that episode does not contain explicit content.

§Examples
use rss::extension::itunes::ITunesItemExtension;

let mut extension = ITunesItemExtension::default();
extension.set_explicit("Yes".to_string());
source

pub fn closed_captioned(&self) -> Option<&str>

Return whether this podcast episode contains embedded closed captioning.

A value of Yes indicates that it does. Any other value indicates that it does not.

§Examples
use rss::extension::itunes::ITunesItemExtension;

let mut extension = ITunesItemExtension::default();
extension.set_closed_captioned("Yes".to_string());
assert_eq!(extension.closed_captioned(), Some("Yes"));
source

pub fn set_closed_captioned<V>(&mut self, closed_captioned: V)
where V: Into<Option<String>>,

Set whether this podcast episode contains embedded closed captioning.

A value of Yes indicates that it does. Any other value indicates that it does not.

§Examples
use rss::extension::itunes::ITunesItemExtension;

let mut extension = ITunesItemExtension::default();
extension.set_closed_captioned("Yes".to_string());
source

pub fn order(&self) -> Option<&str>

Return the value used to override the default sorting order for episodes.

§Examples
use rss::extension::itunes::ITunesItemExtension;

let mut extension = ITunesItemExtension::default();
extension.set_order("1".to_string());
assert_eq!(extension.order(), Some("1"));
source

pub fn set_order<V>(&mut self, order: V)
where V: Into<Option<String>>,

Set the value used to override the default sorting order for episodes.

§Examples
use rss::extension::itunes::ITunesItemExtension;

let mut extension = ITunesItemExtension::default();
extension.set_order("1".to_string());
source

pub fn subtitle(&self) -> Option<&str>

Return the description of this podcast episode.

§Examples
use rss::extension::itunes::ITunesItemExtension;

let mut extension = ITunesItemExtension::default();
extension.set_subtitle("An episode".to_string());
assert_eq!(extension.subtitle(), Some("An episode"));
source

pub fn set_subtitle<V>(&mut self, subtitle: V)
where V: Into<Option<String>>,

Set the description of this podcast episode.

§Examples
use rss::extension::itunes::ITunesItemExtension;

let mut extension = ITunesItemExtension::default();
extension.set_subtitle("An episode".to_string());
source

pub fn summary(&self) -> Option<&str>

Return the summary for this podcast episode.

§Examples
use rss::extension::itunes::ITunesItemExtension;

let mut extension = ITunesItemExtension::default();
extension.set_summary("An episode".to_string());
assert_eq!(extension.summary(), Some("An episode"));
source

pub fn set_summary<V>(&mut self, summary: V)
where V: Into<Option<String>>,

Set the summary for this podcast episode.

§Examples
use rss::extension::itunes::ITunesItemExtension;

let mut extension = ITunesItemExtension::default();
extension.set_summary("An episode".to_string());
source

pub fn keywords(&self) -> Option<&str>

Return the keywords for this podcast episode.

A comma separated list of keywords.

§Examples
use rss::extension::itunes::ITunesItemExtension;

let mut extension = ITunesItemExtension::default();
extension.set_keywords("technology".to_string());
assert_eq!(extension.keywords(), Some("technology"));
source

pub fn set_keywords<V>(&mut self, keywords: V)
where V: Into<Option<String>>,

Set the keywords for this podcast episode.

A comma separated list of keywords.

§Examples
use rss::extension::itunes::ITunesItemExtension;

let mut extension = ITunesItemExtension::default();
extension.set_keywords("technology".to_string());
source

pub fn episode(&self) -> Option<&str>

Return the episode number of this podcast episode

The episode number will be a string although it is typically a number in practice

§Examples
use rss::extension::itunes::ITunesItemExtension;

let mut extension = ITunesItemExtension::default();
extension.set_episode("3".to_string());
assert_eq!(extension.episode(), Some("3"));
source

pub fn set_episode<V>(&mut self, episode: V)
where V: Into<Option<String>>,

Set the the episode number for this episode.

An string.

§Examples
use rss::extension::itunes::ITunesItemExtension;

let mut extension = ITunesItemExtension::default();
extension.set_episode("2".to_string());
assert_eq!(extension.episode(), Some("2"));
source

pub fn season(&self) -> Option<&str>

Return the season of this podcast episode

The season will be a string although it is typically a number in practice

§Examples
use rss::extension::itunes::ITunesItemExtension;

let mut extension = ITunesItemExtension::default();
extension.set_season("3".to_string());
assert_eq!(extension.season(), Some("3"));
source

pub fn set_season<V>(&mut self, season: V)
where V: Into<Option<String>>,

Set the the season number for this episode.

An integer.

§Examples
use rss::extension::itunes::ITunesItemExtension;

let mut extension = ITunesItemExtension::default();
extension.set_season("3".to_string());
assert_eq!(extension.season(), Some("3"));
source

pub fn episode_type(&self) -> Option<&str>

Return the episode_type of this podcast episode

The episode type will be a string usually “full” “trailer” or “bonus”

§Examples
use rss::extension::itunes::ITunesItemExtension;

let mut extension = ITunesItemExtension::default();
extension.set_episode_type("trailer".to_string());
assert_eq!(extension.episode_type(), Some("trailer"));
source

pub fn set_episode_type<V>(&mut self, episode_type: V)
where V: Into<Option<String>>,

Set the the episode type for this episode.

A string, usually “full” but maybe “trailer” or “bonus”

§Examples
use rss::extension::itunes::ITunesItemExtension;

let mut extension = ITunesItemExtension::default();
extension.set_episode_type("full".to_string());
assert_eq!(extension.episode_type(), Some("full"));
source§

impl ITunesItemExtension

source

pub fn from_map(map: BTreeMap<String, Vec<Extension>>) -> Self

Create an ITunesChannelExtension from a BTreeMap.

Trait Implementations§

source§

impl Clone for ITunesItemExtension

source§

fn clone(&self) -> ITunesItemExtension

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ITunesItemExtension

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for ITunesItemExtension

source§

fn default() -> ITunesItemExtension

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for ITunesItemExtension

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq for ITunesItemExtension

source§

fn eq(&self, other: &ITunesItemExtension) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for ITunesItemExtension

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl StructuralPartialEq for ITunesItemExtension

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,