feed_parser/parsers/mod.rs
1use serde::Deserialize;
2pub mod atom;
3pub mod rss1;
4pub mod rss2;
5
6/// Represents a feed with various metadata fields.
7///
8/// This struct is used to deserialize feed data from different formats such as Atom, RSS1, and RSS2.
9///
10/// # Fields
11///
12/// * `title` - The title of the feed.
13/// * `link` - The URL link to the feed.
14/// * `description` - An optional description of the feed.
15/// * `summary` - An optional summary of the feed.
16/// * `updated` - An optional field representing the last updated date of the feed.
17/// * `publish_date` - An optional field representing the publish date of the feed.
18/// * `creator` - An optional field representing the creator of the feed.
19/// * `date` - An optional field representing the date associated with the feed.
20/// * `other` - An optional field for any other additional information.
21#[derive(Deserialize, PartialEq, Debug)]
22pub struct Feed {
23 pub title: String,
24 pub link: String,
25 pub description: Option<String>,
26 pub summary: Option<String>,
27 pub updated: Option<String>,
28 pub publish_date: Option<String>,
29 pub creator: Option<String>,
30 pub date: Option<String>,
31 pub other: Option<String>,
32}