A fast RSS feed parser written in Rust.
rss-rs provides a complete implementation of the RSS 2.0 specification.
To use rss-rs just add the dependency to your Cargo.toml
.
toml
[dependencies]
rss-rs = "0.2"
The package includes a single crate named rss
.
rust
extern crate rss;
Reading can be done using any object that implements the BufRead
trait.
rust
let reader: BufRead = ...;
let channel = Channel::read_from(reader).unwrap();
Elements which have non-default namespaces will be considered extensions. Extensions are stored in Channel.extensions
and Item.extensions
.
For conveninence, Dublin Core and iTunes extensions are extracted to structs and stored in Channel.itunes_ext
, Channel.dublin_core_ext
, Item.itunes_ext
, and Item.dublin_core_ext
.
As a best effort to parse invalid feeds rss-rs will default elements declared as "required" by the RSS 2.0 specification to an empty string.