Struct rss::Channel
[−]
[src]
pub struct Channel {
pub title: String,
pub link: String,
pub description: String,
pub language: Option<String>,
pub pub_date: Option<String>,
pub last_build_date: Option<String>,
pub categories: Vec<String>,
pub items: Vec<Item>,
}A representation of the <channel> element.
Fields
title: String
The name of the channel. This is the content of the <title> element inside the <channel>.
link: String
The URL for the website corresponding to the channel. This is the content of the <link> element inside the <channel>.
description: String
The description of the channel. This is the content of the <description> element inside the <channel>.
language: Option<String>
The language of the channel. This is the content of the <language> element inside the <channel>.
pub_date: Option<String>
The publication date for the content of the channel. This is the content of the <pubDate> element inside the <channel>.
last_build_date: Option<String>
The date that the contents of the channel last changed. This is the content of the <lastBuildDate> element inside the <channel>.
categories: Vec<String>
The categories the channel belongs to. This is the content of all of the <category> elements inside the <channel>.
items: Vec<Item>
The items in the channel. This is the content of all of the <item> elements inside the <channel>.
Methods
impl Channel[src]
fn read_from<R: Read>(reader: R) -> Result<Channel, Error>
Attempt to read the RSS channel from the speficied reader.
Example
let reader: Read = ...; let channel = Channel::read_from(reader).unwrap();