novel_cli/utils/
novel.rs

1use image::DynamicImage;
2
3#[must_use]
4pub struct Novel {
5    pub name: String,
6    pub author_name: String,
7    pub introduction: Option<Vec<String>>,
8    pub cover_image: Option<DynamicImage>,
9    pub volumes: Vec<Volume>,
10}
11
12#[must_use]
13pub struct Volume {
14    pub title: String,
15    pub chapters: Vec<Chapter>,
16}
17
18#[must_use]
19pub struct Chapter {
20    pub id: u32,
21    pub title: String,
22    pub contents: Option<Vec<Content>>,
23}
24
25#[derive(Debug)]
26#[must_use]
27pub enum Content {
28    Text(String),
29    Image(DynamicImage),
30}