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
sourceimpl 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) where
V: Into<String>,
pub fn set_text<V>(&mut self, text: V) where
V: Into<String>,
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) where
V: Into<Option<Box<ITunesCategory>>>,
pub fn set_subcategory<V>(&mut self, subcategory: V) where
V: Into<Option<Box<ITunesCategory>>>,
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
sourceimpl Clone for ITunesCategory
impl Clone for ITunesCategory
sourcefn clone(&self) -> ITunesCategory
fn clone(&self) -> ITunesCategory
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ITunesCategory
impl Debug for ITunesCategory
sourceimpl Default for ITunesCategory
impl Default for ITunesCategory
sourcefn default() -> ITunesCategory
fn default() -> ITunesCategory
Returns the “default value” for a type. Read more
sourceimpl PartialEq<ITunesCategory> for ITunesCategory
impl PartialEq<ITunesCategory> for ITunesCategory
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &ITunesCategory) -> bool
fn ne(&self, other: &ITunesCategory) -> bool
This method tests for !=
.
impl StructuralPartialEq for ITunesCategory
Auto Trait Implementations
impl RefUnwindSafe for ITunesCategory
impl Send for ITunesCategory
impl Sync for ITunesCategory
impl Unpin for ITunesCategory
impl UnwindSafe for ITunesCategory
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more