RSS feed parser written in Rust.
Two XML parsing backends are currently supported, xml-rs and quick-xml. By default rss-rs uses xml-rs as its parser.
To use rss-rs just add the dependency to your Cargo.toml
.
toml
[dependencies]
rss-rs = "0.1"
If you would like to use rss-rs with quick-xml as the XML parser then enable the quick-xml
feature and disable default features.
yaml
[dependencies]
rss-rs = {version = "0.1", features = ["quick-xml"], default-features = false}
The package includes a single crate named rss
.
rust
extern crate rss;
Reading can be done using any object that implements the Read
trait.
rust
let reader: Read = ...;
let channel = Channel::read_from(reader).unwrap();
Reading can be done using any object that implements the BufRead
trait.
rust
let reader: BufRead = ...;
let channel = Channel::read_from(reader).unwrap();