rust-atom

Rust library for serializing the Atom web content syndication format.

Usage

Add this to your Cargo.toml:

toml [dependencies] atom_syndication = "0.3"

and this to your crate root:

rust extern crate atom_syndication;

Examples

Writing

```rust use atom::{Feed, Entry};

let entry = Entry { id: String::from("urn:uuid:4ae8550b-2987-49fa-9f8c-54c180c418ac"), title: String::from("Ford hires Elon Musk as CEO"), updated: String::from("2019-04-01T07:30:00Z"), ..Default::default() };

let feed = Feed { id: String::from("urn:uuid:b3420f84-6bdf-4f46-a225-f1b9a14703b6"), title: String::from("TechCrunch"), updated: String::from("2019-04-01T07:30:00Z"), entries: vec![entry], ..Default::default() };

let atomstring = feed.tostring(); ```

Reading

```rust use atom::Feed;

let atom_str = r#" urn:uuid:b3420f84-6bdf-4f46-a225-f1b9a14703b6 TechCrunch 2019-04-01T07:30:00Z urn:uuid:4ae8550b-2987-49fa-9f8c-54c180c418ac Ford hires Elon Musk as CEO 2019-04-01T07:30:00Z "#;

let feed = atom_str.parse::().unwrap(); ```

Acknowledgements

Thanks to:

License

Licensed under either of

at your option.

Contribution

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.