ReadFeed
ReadFeed is a library to process feeds. It provides pull parsers for common feed formats such as RSS and Atom.
Examples
RSS
use ;
let input = "
<rss>
<channel>
<title>Channel Title</title>
<item>
<title>Item Title 1</title>
<link>https://example.com/1</link>
<description>Item Description 1</description>
</item>
</channel>
</rss>
";
let mut iter = new;
let Some = iter.next else ;
let Some = rss_iter.next else ;
if let Some = channel_iter.next else
let Some = channel_iter.next else ;
if let Some = item_iter.next else
if let Some = item_iter.next else
if let Some = item_iter.next else
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
Atom
use ;
let input = r#"
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Lorem ipsum dolor sit amet.</title>
<link href="https://example.com/"/>
<updated>2021-02-24T09:08:10Z</updated>
<id>urn:uuid:ba9192e8-9e34-4c23-8445-94b67ba316ee</id>
<entry>
<title>Lorem ipsum dolor sit.</title>
<link href="http://example.com/2021/02/24/hello"/>
<id>urn:uuid:425ba23c-d283-4580-8a3c-3b67aaa6b373</id>
<updated>2021-02-24T09:08:10Z</updated>
<summary>Lorem ipsum dolor sit amet, consectetur adipiscing.</summary>
</entry>
</feed>
"#;
let mut iter = new;
let Some = iter.next else ;
if let Some = feed_iter.next else
if let Some = feed_iter.next else
if let Some = feed_iter.next else
if let Some = feed_iter.next else
if let Some = feed_iter.next else
assert_eq!;
assert_eq!;
Installation
By default, the std feature is enabled.
Alloc only
If the host environment has an allocator but does not have access to the Rust
std library:
No allocator / core only
If the host environment does not have an allocator:
License
Licensed under either of Apache License, Version 2.0 or MIT License at your option.
Contributions
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.