[][src]Struct rss::Category

pub struct Category { /* fields omitted */ }

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]

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]

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]

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

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.