parse_book_source/book/
mod.rs

1use serde::{Deserialize, Serialize};
2
3pub type BookList = Vec<BookListItem>;
4pub type ChapterList = Vec<Chapter>;
5pub type ExploreList = Vec<ExploreItem>;
6
7#[derive(Default, Debug, Clone, Serialize, Deserialize, Hash, PartialEq, Eq)]
8pub struct ExploreItem {
9    pub title: String,
10    pub url: String,
11}
12
13#[derive(Default, Debug, Clone, Serialize, Deserialize, Hash, PartialEq, Eq)]
14pub struct BookListItem {
15    pub book_url: String,
16
17    #[serde(flatten)]
18    pub book_info: BookInfo,
19}
20
21#[derive(Default, Debug, Clone, Serialize, Deserialize, Hash, PartialEq, Eq)]
22pub struct BookInfo {
23    pub author: String,
24    pub cover_url: String,
25    pub intro: String,
26    pub kind: String,
27    pub last_chapter: String,
28    pub name: String,
29    pub toc_url: String,
30    pub word_count: String,
31}
32
33#[derive(Default, Debug, Clone, Serialize, Deserialize, Hash, PartialEq, Eq)]
34pub struct Chapter {
35    pub chapter_name: String,
36    pub chapter_url: String,
37}