rss2email_lib/
blog.rs

1use chrono::{DateTime, Utc};
2
3/// Internal representation of a web feed.
4#[derive(Debug, Clone, PartialEq, Eq)]
5pub struct Blog {
6  pub title: String,
7  pub most_recent_pub_date: DateTime<Utc>,
8  pub posts: Vec<Post>,
9}
10
11/// Internal representation of a web feed post.
12///
13/// The `pub_date` field will prefer the publication date
14/// and fallback to the last update date.
15#[derive(Debug, Clone, PartialEq, Eq)]
16pub struct Post {
17  pub title: String,
18  pub link: String,
19  pub description: Option<String>,
20  pub pub_date: DateTime<Utc>,
21}