finance_query/models/news/
scraped.rs1use serde::{Deserialize, Serialize};
4
5#[derive(Debug, Clone, Serialize, Deserialize)]
7#[cfg_attr(feature = "dataframe", derive(crate::ToDataFrame))]
8#[non_exhaustive]
9pub struct News {
10 pub title: String,
12
13 pub link: String,
15
16 pub source: String,
18
19 pub img: String,
21
22 pub time: String,
24}
25
26impl News {
27 pub(crate) fn new(
29 title: String,
30 link: String,
31 source: String,
32 img: String,
33 time: String,
34 ) -> Self {
35 Self {
36 title,
37 link,
38 source,
39 img,
40 time,
41 }
42 }
43}