Skip to main content

epub_parser/
toc.rs

1#[derive(Debug, Clone, Default)]
2pub struct TocEntry {
3    pub label: String,
4    pub href: String,
5    pub children: Vec<TocEntry>,
6}
7
8impl TocEntry {
9    pub fn new(label: String, href: String) -> Self {
10        TocEntry {
11            label,
12            href,
13            children: Vec::new(),
14        }
15    }
16}