1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
use image::DynamicImage;

#[must_use]
pub struct Novel {
    pub name: String,
    pub author_name: String,
    pub introduction: Option<Vec<String>>,
    pub cover_image: Option<DynamicImage>,
    pub volumes: Vec<Volume>,
}

#[must_use]
pub struct Volume {
    pub title: String,
    pub chapters: Vec<Chapter>,
}

#[must_use]
pub struct Chapter {
    pub id: u32,
    pub title: String,
    pub contents: Option<Vec<Content>>,
}

#[must_use]
pub enum Content {
    Text(String),
    Image(DynamicImage),
}