Struct rss::extension::itunes::ITunesCategory
source · pub struct ITunesCategory {
pub text: String,
pub subcategory: Option<Box<ITunesCategory>>,
}
Expand description
A category for an iTunes podcast.
Fields§
§text: String
The name of the category.
subcategory: Option<Box<ITunesCategory>>
An optional subcategory for the category.
Implementations§
source§impl ITunesCategory
impl ITunesCategory
sourcepub fn text(&self) -> &str
pub fn text(&self) -> &str
Return the name of this category.
§Examples
use rss::extension::itunes::ITunesCategory;
let mut category = ITunesCategory::default();
category.set_text("Technology");
assert_eq!(category.text(), "Technology")
sourcepub fn set_text<V>(&mut self, text: V)
pub fn set_text<V>(&mut self, text: V)
Set the name of this category.
§Examples
use rss::extension::itunes::ITunesCategory;
let mut category = ITunesCategory::default();
category.set_text("Technology");
sourcepub fn subcategory(&self) -> Option<&ITunesCategory>
pub fn subcategory(&self) -> Option<&ITunesCategory>
Return the subcategory for this category.
§Examples
use rss::extension::itunes::ITunesCategory;
let mut category = ITunesCategory::default();
category.set_subcategory(Box::new(ITunesCategory::default()));
assert!(category.subcategory().is_some());
sourcepub fn set_subcategory<V>(&mut self, subcategory: V)
pub fn set_subcategory<V>(&mut self, subcategory: V)
Set the subcategory for this category.
§Examples
use rss::extension::itunes::ITunesCategory;
let mut category = ITunesCategory::default();
category.set_subcategory(Box::new(ITunesCategory::default()));
Trait Implementations§
source§impl Clone for ITunesCategory
impl Clone for ITunesCategory
source§fn clone(&self) -> ITunesCategory
fn clone(&self) -> ITunesCategory
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ITunesCategory
impl Debug for ITunesCategory
source§impl Default for ITunesCategory
impl Default for ITunesCategory
source§fn default() -> ITunesCategory
fn default() -> ITunesCategory
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for ITunesCategory
impl<'de> Deserialize<'de> for ITunesCategory
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 ITunesCategory
impl PartialEq for ITunesCategory
source§fn eq(&self, other: &ITunesCategory) -> bool
fn eq(&self, other: &ITunesCategory) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for ITunesCategory
impl Serialize for ITunesCategory
impl StructuralPartialEq for ITunesCategory
Auto Trait Implementations§
impl Freeze for ITunesCategory
impl RefUnwindSafe for ITunesCategory
impl Send for ITunesCategory
impl Sync for ITunesCategory
impl Unpin for ITunesCategory
impl UnwindSafe for ITunesCategory
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more