rust-rss

Build Status rss on Crates.io

Documentation

Library for serializing the RSS web content syndication format

Examples

Writing

```rust use rss::{Channel, Item, Rss};

let item = Item { title: Some(String::from("Ford hires Elon Musk as CEO")), pub_date: Some(String::from("01 Apr 2019 07:30:00 GMT")), description: Some(String::from("In an unprecedented move, Ford hires Elon Musk.")), ..Default::default() };

let channel = Channel { title: String::from("TechCrunch"), link: String::from("http://techcrunch.com"), description: String::from("The latest technology news and information on startups"), items: vec![item], ..Default::default() };

let rss = Rss(channel);

let rssstring = rss.tostring(); ```

Reading

```rust use rss::Rss;

let rss_str = r#" Public weblog for Pinboard http://techcrunch.com The latest technology news and information on startups Ford hires Elon Musk as CEO 01 Apr 2019 07:30:00 GMT In an unprecedented move, Ford hires Elon Musk. "#;

let rss = rss_str.parse::().unwrap(); ```