pub struct Category {
pub name: String,
pub domain: Option<String>,
}
Expand description
Represents a category in an RSS feed.
Fields§
§name: String
The name of the category.
domain: Option<String>
The domain for the category.
Implementations§
source§impl Category
impl Category
sourcepub fn name(&self) -> &str
pub fn name(&self) -> &str
Return the name of this category.
Examples
use rss::Category;
let mut category = Category::default();
category.set_name("Technology");
assert_eq!(category.name(), "Technology");
sourcepub fn set_name<V>(&mut self, name: V)where
V: Into<String>,
pub fn set_name<V>(&mut self, name: V)where V: Into<String>,
Set the name of this category.
Examples
use rss::Category;
let mut category = Category::default();
category.set_name("Technology");
Trait Implementations§
source§impl<'de> Deserialize<'de> for Category
impl<'de> Deserialize<'de> for Category
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 Category
impl PartialEq for Category
impl StructuralPartialEq for Category
Auto Trait Implementations§
impl RefUnwindSafe for Category
impl Send for Category
impl Sync for Category
impl Unpin for Category
impl UnwindSafe for Category
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