[−][src]Struct rss::Category
Represents a category in an RSS feed.
Methods
impl Category
[src]
pub fn name(&self) -> &str
[src]
Return the name of this category.
Examples
use rss::Category; let mut category = Category::default(); category.set_name("Technology"); assert_eq!(category.name(), "Technology");
pub fn set_name<V>(&mut self, name: V) where
V: Into<String>,
[src]
V: Into<String>,
Set the name of this category.
Examples
use rss::Category; let mut category = Category::default(); category.set_name("Technology");
pub fn domain(&self) -> Option<&str>
[src]
Return the domain of this category.
Examples
use rss::Category; let mut category = Category::default(); category.set_domain("http://example.com".to_string()); assert_eq!(category.domain(), Some("http://example.com"));
pub fn set_domain<V>(&mut self, domain: V) where
V: Into<Option<String>>,
[src]
V: Into<Option<String>>,
Set the domain of this category.
Examples
use rss::Category; let mut category = Category::default(); category.set_domain("http://example.com".to_string());
impl Category
[src]
pub fn from_xml<R: BufRead>(
reader: &mut Reader<R>,
atts: Attributes
) -> Result<Self, Error>
[src]
reader: &mut Reader<R>,
atts: Attributes
) -> Result<Self, Error>
Builds a Category from source XML
Trait Implementations
impl Clone for Category
[src]
impl Debug for Category
[src]
impl Default for Category
[src]
impl PartialEq<Category> for Category
[src]
impl StructuralPartialEq for Category
[src]
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,